The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-23-2008
danceofillusion danceofillusion is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 14
Almost impossible question

Would anyone know how to get a directory listing of all files in a directory as well as all the files in their respective subdirectories and save the listings to a file? I realize this is tricky.
  #2 (permalink)  
Old 04-23-2008
shamrock shamrock is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2007
Location: USA
Posts: 750
Use the find command.
  #3 (permalink)  
Old 04-23-2008
danceofillusion danceofillusion is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 14
Quote:
Originally Posted by shamrock View Post
Use the find command.
..lol..can anyone at all help me?
  #4 (permalink)  
Old 04-23-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
The forums are shock full of examples. I would estimate that there would be a dozen good hints if you were to take the time search just the last few days' worth of postings.

Code:
find . -ls > outputfile
... provided your find understands -ls
  #5 (permalink)  
Old 04-23-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,763
Code:
find /path/to/starting/directory -exec ls {} \;
will work on any modern unix system
  #6 (permalink)  
Old 04-23-2008
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,122
Quote:
Originally Posted by jim mcnamara View Post
Code:
find /path/to/starting/directory -exec ls {} \;
will work on any modern unix system
find /path/to/starting/directory -type f > outputfile
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0