LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-11-2006, 06:07 AM   #1
matsko
Member
 
Registered: Dec 2005
Posts: 51

Rep: Reputation: Disabled
Biggest File Within Directory


how do you figure out or list the largest file within a directory?

Say I have a have a directory that has 100,000 files then how could I figure out which files it the largest?
 
Old 04-11-2006, 06:24 AM   #2
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Use ls -S. Largest comes first.
 
Old 04-11-2006, 06:30 AM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Something like the following should do it:
Code:
ls -Sl /home/ftp/pub/Linux/Slackware/slackware-current | grep -v '^total' | head -1
 
  


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
libtermcap.so.2: cannot open shared object file: No such file or directory tcma Linux - Software 11 02-24-2012 04:00 AM
awk: fatal:cannot open file for reading (no such file or Directory) in Linux sangati vishwanath Linux - Software 4 07-06-2005 01:59 AM
Looking for biggest files into a directory jobano Linux - Software 3 10-04-2004 02:48 PM
libawt.so: libXp.so.6: cannot open shared object file: No such file or directory man26 *BSD 0 09-10-2004 09:34 AM
The file or directory file:/misc/cdrom does not exist rangerssg Linux - Newbie 5 08-29-2004 06:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:22 PM.

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