Operating System - HP-UX
1833883 Members
1501 Online
110063 Solutions
New Discussion

Re: List files with 0 size

 
SOLVED
Go to solution
Ricky B. Nino
Frequent Advisor

List files with 0 size

Hi,

How can I list down all the files with zero size?
Opportunities expand for people willing to put time and effort into learning new skills.
3 REPLIES 3
S.K. Chan
Honored Contributor
Solution

Re: List files with 0 size

Example .. list down all zero size files under /tmp.
# find /tmp -size 0c | xargs ll
S.K. Chan
Honored Contributor

Re: List files with 0 size

This is more specific .. (ignore the previous)..
# find /tmp -type f -size 0c | xargs ll
Bernd Dittmar
Advisor

Re: List files with 0 size

Find all "zero" Files in /tmp an delete them:

find /tmp -name "tmp*" -size 0c -exec rm -f {} \;
BaaN IV on HP-UX