Linux Command to find zero file sizes
Option 1: List all files in the directory and its subdirectories which has a filesize of zero
# du -ak | awk '{if ($1 == 0) print $0}'
You can also include in your command which directory you want to search.
# du -ak "directory to search" | awk '{if ($1 == 0) print $0}'
(replace "directory to search" with the directory you want to search)
You can also change the condition inside the (). In this example you are looking for files which uses less than 12 bytes of disk space.
# du -ak | awk '{if ($1 < 12) print $0}'
Monday, October 22, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment