As you can see in the image, I have created a file with the name “empty.sh” in my home directory. Using Shell Redirection Command:įirst of all, to apply the truncate function on a file, you have to create a new file with any name in your home directory in Linux Mint 20. In this article, we are studying the following listed new truncate commands. There are a lot of easy commands to truncate files from the terminal instead of directly doing it from the directory location. Using truncate, you can remove the contents of the file up to zero. Truncate means to remove or clear the contents of any file without even opening it or without deleting the particular file. Some Linux users might find it difficult to truncate the files in Linux Mint 20.
0 Comments
Leave a Reply. |