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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command to find file size?

Status
Not open for further replies.

arobart

IS-IT--Management
Dec 20, 2000
121
US
Is there a command I can use to find files larger than a certain size?

Example: I am in the zoom directory and I want to list any files in zoom that are larger than >1GB

Any way to do that?

Thanks in advance
 
Try the find command:

find ./ -size +1024 -ls

Good luck,
Debi
 
None that I know of. You could..

ls -1qs|sort -nr|more

and look for files > 1048576.

Bill.
 
Actually, the format of the find would be...

find ./ -size +1048576 -ls

 
Thanks !
The find command works great!
 
I learned something today too - the "+" option of size.

BV :)
 
This is sort of related.

You can get a listing of all the files in a directory sorted by size increasing like this:
Code:
ls -l | sort -n +4

I find this helpful to know which files are the biggest in a directory. The largest files will be the last to display.

Hope this helps, Einstein47
(Love is like PI - natural, irrational, endless, and very important.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top