![]() |
|
|
|
|
|||||||
| 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 |
| Script to Analyze folders and subfolders | seacros | Shell Programming and Scripting | 7 | 03-04-2008 11:02 AM |
| How to learn the number of files under a particular folder, containing subfolders | cy163 | UNIX for Dummies Questions & Answers | 5 | 09-01-2007 07:55 AM |
| How to create folders/subfolders using shellscript | ram2s2001 | Shell Programming and Scripting | 2 | 04-05-2006 02:20 AM |
| rename files in subfolders | umen | UNIX for Dummies Questions & Answers | 0 | 09-19-2005 05:19 AM |
| TAR (Extract with subfolders) | roberthawke | UNIX for Dummies Questions & Answers | 2 | 05-30-2002 03:24 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi all. I just only wanna show all files from a whole 'root-table'....to understand:
"ls *.exe" ...for instance in the directory it only shows the files from the folder, but not form the subfolders !? how to solve this problem ? if you are on your home /root/users/.... I want to see all files with this extension.. it's a chance to write "ls -R" ..so it shows all files from the subfolders, but not only the files with the extensions (*.exe)..... my second question - it is possible to get automatic folders? for example, when you wanna make the same subfolders in another folder...for instance you can write the directory in a file "pwd > file" but if you wanna make "mkdir <file" it doesn't work - is there a chance to get this pipe working? thanks a lot for a help..and nice greetings from germany |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
In response to your first question, an "ls -R *.exe" should yield the required files
Cheers ZB |
|
#3
|
|||
|
|||
|
yes, in fact I also thought that this should be right...but it's not working with "ls -R *.exe" also not "ls *.exe -R" ...what the hell
try on ;-) pleaz.. |
|
#4
|
|||
|
|||
|
thanks a lot. at first, the 'find' possibility works great...
find . -name "*.exe" |sort -> shows perfect all files of the subfolder find / -name "*.exe" |sort -> shows all files from all subfolders that's the solution I've searched for nevertheless, the second question.... for instance when you have a directory like that: users/test/a1... users/test/a2... users/test/a3... and so on and you wanna create a directory like: users/test2/a1... users/test2/a2... users/test2/a3... like the other direcorty, a 1:1 copy of the foldernames without any files I've thougt like that: pwd > file1 cp file1 users/test2 cd cd users/test2 mkdir < file1 also mkdir -p "cat file1" , mkdir -p cat "file1" didn't make it working...... so far.................thx |
|
#5
|
||||
|
||||
|
Following on from Drivers post above, you could use
Code:
find . -name "*.exe" -exec ls -l {} \;
Cheers ZB |
|
#6
|
|||
|
|||
|
thx, I'm going to try it...
perhaps the associate with the -exec solution could be very useful for problems afterwards.... by the way, my solution for the second question above was silly. when you make pwd > file1 more file 1 -> users/test/a1.... that means, that it would make a folder like users/test2/users/test/a1...which isn't my intention. |
|
#7
|
|||
|
|||
|
I'm sorry. I didn't know that the different types of tickmarks are so important...secondary I'm using Unix on another System (so I've to deal with vi).
´ ` " ' mkdir -p `cat file1` I'll try it tomorrow again and write you back. Today UNIX is out and over, break. so long.... |
|||
| Google The UNIX and Linux Forums |