Deleting the contents of a large file is a similar task. All we need to do is utilize the /dev/null and direct it’s contents to the large file.
The following command delete all the contents of the file largefile.img
cat /dev/null > largefile.img
Deleting the contents of a large file is a similar task. All we need to do is utilize the /dev/null and direct it’s contents to the large file.
The following command delete all the contents of the file largefile.img
cat /dev/null > largefile.img