Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-08-2007, 07:51 AM
|
#1
|
LQ Newbie
Registered: Oct 2007
Location: Mumbai
Distribution: Fedora 6
Posts: 2
Rep:
|
how do i find the largest file on machine
Hi,
How can I find the largest file on the machine.
Please suggest me different options to do this.
Have a nice day !
Thanks,
Amit.
|
|
|
10-08-2007, 08:05 AM
|
#2
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
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.
|
|
|
10-08-2007, 09:18 AM
|
#3
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
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.
|
|
|
10-08-2007, 03:45 PM
|
#4
|
Member
Registered: Jul 2003
Location: Pennsylvainia
Distribution: Slackware / Debian / *Ubuntu / Opensuse / Solaris uname: Brian Cooney
Posts: 503
Rep:
|
Another hint: If you find yourself searching the filesystem often, the find command can be worth setting up
|
|
|
10-08-2007, 07:09 PM
|
#5
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,430
|
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:07 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|