How to zero out the content of a file?
by Grabby from LinuxQuestions.org on (#5BX5T)
I need to zero out the contents of all the files in a given directory, including all its sub-directories, recursively.
The intended result would be that all the files have the size of 0 bytes, while their file names and paths are unchanged.
Can someone help me? Thanks.
EDIT: I guess the solution involves overwriting each file with an empty (0 bytes of size) file. But still I do not know how to do this recursively.


The intended result would be that all the files have the size of 0 bytes, while their file names and paths are unchanged.
Can someone help me? Thanks.
EDIT: I guess the solution involves overwriting each file with an empty (0 bytes of size) file. But still I do not know how to do this recursively.