Thanks,in advance I want to remove all the zero size files in specified directory,can u tell me the command how to do it on Ubuntu OS.
Thanks' Mukthyar
The first part,-type d -empty -print -delete, will delete all the empty directories, and the second part, -type f -empty -print -delete, will delete all the empty files.
Use * wildcard instead of whole file name if possible to catch any strange characters or spaces in file name.
To remove a directory and all its contents, including any subdirectories and files, use the rm command with the recursive option, -r . Directories that are removed with the rmdir command cannot be recovered, nor can directories and their contents removed with the rm -r command.
find . -size 0c -delete
removes all such files in the current folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With