Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find file > 50mb

Status
Not open for further replies.

tyagineeraj

IS-IT--Management
Mar 27, 2001
16
IN
Hi,

who can i find files > 50mb or so. find command option -size can specify file of specific size.

thanks
neeraj
 
Neat little script, (you may have to make some minor changes as this is from an AIX script i use - but I think it should port directly to HPUX)

find ./ -exec ls -l {} \; | while read file_line
do
f_size=$(echo $file_line | cut -d' ' -f5)
if [[ $f_size -gt $1 ]]
then
echo $file_line
fi
done

then run the script file followed by the file minimum file size you want to find ( or replace the $1 in the script with 50000000)

Hope this helps
Cheers
Phil.
 
Can't you just use

find / -size +50000000 -print

richard

richard@brecon.co.uk
 
find / -size +50000000c -print

If you want to specify the file size in bytes.
Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top