You Asked: How Do I Delete All Empty Files in Linux?
Contents

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.

How do I delete all empty files?

From the Empty Files tab, click Mark all Files and then click Delete Files. Similarly, to delete the 0-byte files in the selected folder tree, click on the Empty Files tab.

How do I delete empty folders in Linux?

To delete an empty directory, use the -d ( –dir ) option and to delete a non-empty directory, and all of its contents use the -r ( –recursive or -R ) option. The -i option tells rm to prompt you to confirm the deletion of each subdirectory and file.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest