How Do I Truncate a File in Linux?
Contents How Do I Truncate a Text File in Linux? to Truncate a File in Linux Use the Redirection Operator > Followed by the File Name. What Is Truncate Command...
Contents
How do I truncate a text file in Linux?
To truncate a file in Linux use the redirection operator > followed by the file name.
Must Read
What is truncate command in Linux?
The Linux truncate command is often used to shrink or extend the size of each FILE to the specified size. … If a FILE (for example archive or log files) is larger than the specified size, the extra data is lost, but if a FILE is shorter, it is extended and the extended part (hole) reads as zero bytes.