LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 10-08-2007, 07:51 AM   #1
amit_joshi
LQ Newbie
 
Registered: Oct 2007
Location: Mumbai
Distribution: Fedora 6
Posts: 2

Rep: Reputation: 0
Smile 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.
 
Old 10-08-2007, 08:05 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
Old 10-08-2007, 09:18 AM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
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.
 
Old 10-08-2007, 03:45 PM   #4
Kahless
Member
 
Registered: Jul 2003
Location: Pennsylvainia
Distribution: Slackware / Debian / *Ubuntu / Opensuse / Solaris uname: Brian Cooney
Posts: 503

Rep: Reputation: 30
Another hint: If you find yourself searching the filesystem often, the find command can be worth setting up
 
Old 10-08-2007, 07:09 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
How to issue "ls" command start with the largest file size in a folder? fjkum Linux - Newbie 5 07-27-2006 03:28 AM
Find 100 largest files in folder tree tyreth Linux - General 2 02-07-2006 08:18 AM
Largest a tar file can be? mijohnst Linux - General 4 02-07-2006 08:14 AM
bash scripting - largest # file extension brian0918 Programming 3 06-16-2003 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration