-   Linux - Newbie (
-   -   how do i find the largest file on machine (

amit_joshi 10-08-2007 08:51 AM

how do i find the largest file on machine

How can I find the largest file on the machine.
Please suggest me different options to do this.
Have a nice day !


druuna 10-08-2007 09:05 AM


This does look like homework...... Ok, without giving the complete answer, this should get you going.

Take a look at the following commands:
- du
- ls
- find (with sort)

Hope this helps.

matthewg42 10-08-2007 10:18 AM

One hint - searching the whole filesystem on Unix-like OSes takes quite a long time. You should try to eliminate any parts of the filesystem which you do not wish to search first, and try to avoid multiple scans.

Kahless 10-08-2007 04:45 PM

Another hint: If you find yourself searching the filesystem often, the find command can be worth setting up

chrism01 10-08-2007 08:09 PM

Actually, the 'find' cmd is std Unix ie it's always there. Perhaps you mean 'locate', which requires you to run a script regularly to keep it's db updated.

All times are GMT -5. The time now is 11:10 PM.