Command to list all files | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Command to list all files

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 11-06-2005
groundlevel groundlevel is offline
Registered User
 
Join Date: Nov 2005
Last Activity: 29 September 2006, 12:37 PM EDT
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Command to list all files

Hi

Is there a command(s) which can be used to get a list of all files, including all files in all subdirectories on a given volume?

Thanks

All My Best,
Jeffrey
Sponsored Links
    #2  
Old 11-06-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 24 November 2014, 10:48 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 438 Times in 261 Posts
You will need read permission on all of the directories so you may need to do this as root. First "cd mountpoint" then use the find command. So for /usr:
cd /usr
find . -print

Also there is a -R option to ls so:
ls -lR
is another approach.
Sponsored Links
    #3  
Old 11-06-2005
tayyabq8's Avatar
tayyabq8 tayyabq8 is offline Forum Advisor  
Ex-Moderator
 
Join Date: Nov 2004
Last Activity: 16 December 2013, 12:55 AM EST
Location: Bahrain
Posts: 592
Thanks: 3
Thanked 8 Times in 3 Posts
Try this
#ls -ltR
    #4  
Old 11-06-2005
vino's Avatar
vino vino is offline Forum Advisor  
Supporter (in vino veritas)
 
Join Date: Feb 2005
Last Activity: 9 April 2013, 8:19 AM EDT
Location: Sydney, Down Under
Posts: 2,847
Thanks: 0
Thanked 12 Times in 12 Posts
You could try


Code:
ls -1R

or


Code:
find /path/to/search -name '*.*'

Sponsored Links
    #5  
Old 11-06-2005
groundlevel groundlevel is offline
Registered User
 
Join Date: Nov 2005
Last Activity: 29 September 2006, 12:37 PM EDT
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Hi--

Thanks all

Ok. It looks like I need a more specific control over ls or find. These seem to be finding not only all the files on the volume I want, but also, since the volumes directory exists on the volume, all files on *all* the volumes.

Is there a way to exclude any files in the volumes directory, and, to also list the modification time and date and size of each file found?

Thanks again

All My Best,
Jeffrey
Sponsored Links
    #6  
Old 11-06-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 24 November 2014, 10:48 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 438 Times in 261 Posts
What os? Do "uname -a" to find out.
Sponsored Links
    #7  
Old 11-06-2005
groundlevel groundlevel is offline
Registered User
 
Join Date: Nov 2005
Last Activity: 29 September 2006, 12:37 PM EDT
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Darwin xxx 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Command to list current day files only josephroyal Shell Programming and Scripting 6 06-27-2011 11:35 AM
list files .txt and .TXT in one command thepurple Solaris 4 12-31-2008 09:32 AM
Command to list large files search66 UNIX for Dummies Questions & Answers 13 12-11-2008 08:20 AM
command to list dot files Jakeman1086 UNIX for Dummies Questions & Answers 4 09-09-2007 02:42 AM
can we list other than c files in a directory with only 'ls' command? venkat UNIX for Dummies Questions & Answers 3 03-12-2004 09:17 AM



All times are GMT -4. The time now is 05:25 AM.