![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Deep Packet Inspection | iBot | IT Security RSS | 0 | 05-29-2008 07:50 AM |
| Forcing UID on Files/Dirs Created with SFTP? | deckard | UNIX for Dummies Questions & Answers | 5 | 05-28-2008 07:19 AM |
| monitoring dirs | da-seot | Shell Programming and Scripting | 1 | 09-02-2007 11:55 PM |
| Traversing thru dirs and deleting files based on date | ravi2082 | Shell Programming and Scripting | 5 | 07-18-2007 01:28 PM |
| recursion too deep | swamy455 | Shell Programming and Scripting | 3 | 07-18-2005 12:18 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I need to ls all files in 4-6 deep dirs
I need to print to file , a listing of all files below a certain directory.
Example: I need to print to file a listing of all files below the etc dir (including the subdirectories) with their full path. Any ideas on how to do this with one command. Or is this something I need to do on all directories ie... ls -?? TIA! |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Hi,
The solution can be : find /etc >/tmp/output This will list all files and directories under /etc as a name. If you want files and directories seperated you can do this : find /etc -type d >/tmp/output_directory find /etc -type f >/tmp/output_files Or if you want a ls -l listing of each file : find /etc -type f -exec ll {} \; >/tmp/long_outp_f find /etc -type d -exec ls -lad {} \; >/tmp/long_outp_d Good luck. Regs David |
|
#3
|
|||
|
|||
|
Thanks David, that did it!
|
|
#4
|
||||
|
||||
|
Gforty...
IF you need to do precise directories a certain depth... use the -depth option for find...
__________________
My brain is your brain |
|
#5
|
||||
|
||||
|
Quote:
The moral: Check your own local manpages! |
||||
| Google The UNIX and Linux Forums |