How to Truncate (Empty) Files in Linux

Posted by linuxize on Sep 13, 2019 2:42 PM EDT
Linuxize.com; By Linuxize
Mail this story
Print this story

This tutorial explains how to truncate files to zero size in Linux systems using shell redirection and the truncate command.

Truncating a file is much faster and easier than deleting the file, recreating it, and setting the correct permissions and ownership. Also, if the file is opened by a process, removing the file may cause the program that uses it to malfunction.

Full Story

  Nav
» Read more about: Groups: GNU

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.