LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-07-2005, 01:45 AM   #1
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,573

Rep: Reputation: 210Reputation: 210Reputation: 210
file list


Quick question: What's an easy command-line prompt for listing all the files of my computer, sorted in order, from largest to smallest? With the sizes listed?
 
Old 12-07-2005, 03:46 AM   #2
T.Hsu
Member
 
Registered: Jan 2005
Posts: 178

Rep: Reputation: 31
find / -type f -exec du {} \; | sort -nr
 
Old 12-07-2005, 03:48 AM   #3
prabuayyappan
Member
 
Registered: Sep 2005
Location: Coimbatore
Distribution: Prabuayyappan
Posts: 32

Rep: Reputation: 15
ls -Sl
will list the files in order sorted from largest to smallest with the size listed
 
Old 12-07-2005, 09:54 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally Posted by prabuayyappan
ls -Sl
will list the files in order sorted from largest to smallest with the size listed
That's only going to do the pwd..

And remember, doing a file list of all files on your machine can take sometime and resources away, depending on the type of machine. Narrowing your list will return quicker results or if you know what directory you want to search, it will speed things up.

Last edited by trickykid; 12-07-2005 at 09:55 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
list file name ust Linux - Software 4 12-07-2005 03:58 AM
Help!How can I get the file name list in C program? wuzhong Programming 6 09-22-2004 12:56 PM
Looping thru a list in a file BruceC Linux - Newbie 12 05-19-2004 09:51 AM
C++ get file list Wynd Programming 2 06-09-2003 06:33 AM
can not list tar file juno Linux - Software 2 09-23-2002 03:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:51 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