Unix/Linux 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 Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 11-05-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 Linux

All My Best,
Jeffrey
Sponsored Links
    #2  
Old Unix and Linux 11-06-2005
Perderabo's Unix or Linux Image
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 8 August 2015, 12:06 PM EDT
Location: Ashburn, Virginia
Posts: 9,931
Thanks: 64
Thanked 450 Times in 264 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 Unix and Linux 11-06-2005
tayyabq8's Unix or Linux Image
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 10 Times in 4 Posts
Try this
#ls -ltR
    #4  
Old Unix and Linux 11-06-2005
vino's Unix or Linux Image
vino vino is offline Forum Advisor  
Supporter (in vino veritas)
 
Join Date: Feb 2005
Last Activity: 12 March 2015, 5:33 AM EDT
Location: Sydney, Down Under
Posts: 2,848
Thanks: 0
Thanked 13 Times in 13 Posts
You could try


Code:
ls -1R

or


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

Sponsored Links
    #5  
Old Unix and Linux 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 Linux

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 Linux

All My Best,
Jeffrey
Sponsored Links
    #6  
Old Unix and Linux 11-06-2005
Perderabo's Unix or Linux Image
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 8 August 2015, 12:06 PM EDT
Location: Ashburn, Virginia
Posts: 9,931
Thanks: 64
Thanked 450 Times in 264 Posts
What os? Do "uname -a" to find out.
Sponsored Links
    #7  
Old Unix and Linux 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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 10:35 AM
list files .txt and .TXT in one command thepurple Solaris 4 12-31-2008 08:32 AM
Command to list large files search66 UNIX for Dummies Questions & Answers 13 12-11-2008 07:20 AM
command to list dot files Jakeman1086 UNIX for Dummies Questions & Answers 4 09-09-2007 01: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 08:17 AM



All times are GMT -4. The time now is 02:48 PM.