Phan Thị Thùy Dương
Member
How do I truncate a file?
Answer
The easiest and most used method to truncate files is to
use the > shell redirection operator.
…
Shell Redirection
Answer
The easiest and most used method to truncate files is to
use the > shell redirection operator.
…
Shell Redirection
- The : colon means true and produces no output.
- The redirection operator > redirect the output of the preceding command to the given file.
- filename , the file you want to truncate.