How do I find empty files in Linux?

How do I find empty files in Linux?
Answer
Method # 1: Find and delete everything with find command only
  1. find /path/to/dir -empty -type d -delete.
  2. find /path/to/dir -empty -type f -delete.
  3. find ~/Downloads/ -empty -type d -delete.
  4. find ~/Downloads/ -empty -type -f -delete.
 

Tìm kiếm

Back
Top