![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| listing of directories with / at end...without ls -F | vasanthan | UNIX for Dummies Questions & Answers | 10 | 04-16-2008 01:34 AM |
| listing of directories with / ...not to use ls -F | vasanthan | UNIX for Advanced & Expert Users | 1 | 04-16-2008 12:20 AM |
| Listing Deleted Files and Directories | raviviolet13 | Shell Programming and Scripting | 1 | 09-06-2007 10:47 PM |
| Listing directories and ${1:+$1/}* | GMMike | UNIX for Dummies Questions & Answers | 5 | 01-24-2005 06:38 PM |
| files and directories listing | bbolson | UNIX for Dummies Questions & Answers | 1 | 12-11-2001 10:30 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
listing all code in all files in all directories
Hi all,
can any one help me out in this::: basically i need to list all the contents in all files in all directories (starting from root and then onwards)...i will get the session saved in a file (just a secure CRT, etc) seems to be a simple one. if anyone can come forward, its really appreciated. root password is available. Regards, |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Is this what you are looking for?
Code:
ls -lR / >list.dat |
|
#3
|
||||
|
||||
|
Quote:
Code:
find / -type f | xargs cat > outfile If you need the names of each file to prepend to the content's file in the final output file, use the following code ( slower than the previous one ) : Code:
find / -type f | while read files do echo "$files"; cat "$files" done > outfile |
|
#4
|
|||
|
|||
|
ok thanks. if we wanna ignore the binary files how we gonna do it... coz we cannot 'cat / view' them as it shows hexadecimal characters...
|
|
#5
|
|||
|
|||
|
You can use the file command on each file before displaying it. If the output of that command contains the word "text", display it, otherwise display an error like "so-and-so is a binary file".
|
|||
| Google The UNIX and Linux Forums |