how to show size of files in FIND command
Hi to all!
how can i show the size of files if I use the FIND command? Below is the ex: find /home/*/Maildir -size 5M -type f It shows the filename with 5M files size but doesn't print its size. I read the man page but could not locate the one I'm looking for. TIA |
The man page you want is
Code:
man find Code:
find /home/*/Maildir -size 5M -type f -printf "%s " -print |
thanks! Now i know what's wrong in my print command
|
If you want to see all files above 5M, precede the size with a (+) "+5M", to see all files below, (-), with the command you originally used, you will only see files exactly 5M.
|
However the problem is when I search for -size 5M, it also shows the 4.xM files. Is there a possibility that it only shows all 5.xM files?
BTW: this is my command find /home/*/ -size 5M -type f -exec du -h {} \; OR find /home/*/ -size 5M -type f -print0 | xargs -0 du -h |
By rights it is supposed to show what you specify. Even with the (-h) option after du. The (M) in the size is for a true megabyte.
This is from the find man pages: Code:
Numeric arguments can be specified as |
All times are GMT -5. The time now is 10:27 PM. |