subfolders help please important


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers subfolders help please important
# 1  
Old 09-19-2004
Hammer & Screwdriver subfolders help please important

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
# 2  
Old 09-19-2004
In response to your first question, an "ls -R *.exe" should yield the required files

Cheers
ZB
# 3  
Old 09-19-2004
Hammer & Screwdriver also tried...

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 Smilie

try on ;-) pleaz..
# 4  
Old 09-20-2004
MySQL nice ...

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 Smilie

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  
Old 09-20-2004
Following on from Drivers post above, you could use
Code:
find . -name "*.exe" -exec ls -l {} \;

to produce an ls -l style listing, if that's what you want.

Cheers
ZB
# 6  
Old 09-20-2004
CPU & Memory

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.

Smilie
# 7  
Old 09-20-2004
Question my fault..

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....
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Find for files within a list of subfolders

Helo Is there a better way to search within a list of subfolders : A_START_PATH="/data_1/data_2" # # dir2, dir3, dir6, ..... dir59 exists # A_LIST="$A_START_PATH/dir1 $A_START_PATH/dir4 $A_START_PATH/dir5" find "$A_LIST" -type f -name"*.txt" Now searching for all files in any subdirs... (2 Replies)
Discussion started by: jcdole
2 Replies

2. AIX

Help with listing only subfolders

Hi All, I have a AIX file system with a folder structure like this /1 /1/2 /1/2/3/5 /1/2/3/2 /2 /2/3/4 /2/5/6 I would like to list subdirectories /1/2/3/5 /1/2/3/2 /2/3/4 /2/5/6 Can you please help me with this issue. (6 Replies)
Discussion started by: kavinmjr
6 Replies

3. Shell Programming and Scripting

number of subfolders

Hello people i need your help, am still new at unix, How do you find the number of subfolders in a certain or current directory?? (4 Replies)
Discussion started by: donc123
4 Replies

4. UNIX for Dummies Questions & Answers

Need help in checking for files in subfolders

Hi, I am trying to print a listing of files from the top level directory, check to see if any files have the same name as the top level directory name and if so, cd to that file and list the files under it. Don't know how to check for the file in the next level. What I have so far: ... (6 Replies)
Discussion started by: tes218
6 Replies

5. Shell Programming and Scripting

grep to search the subfolders

Hi everybody, I am trying to grep abcds in one folder and in all its subfolders! but it does not work! would you help please? thanks. (3 Replies)
Discussion started by: messi777
3 Replies

6. Shell Programming and Scripting

Search in folder and subfolders

How can this be done? I mean, I want to search for all *png *jpg *bmp files in my ~/Pictures/ folder....How can I list them? Thank you geeks :) :b: (2 Replies)
Discussion started by: hakermania
2 Replies

7. UNIX for Dummies Questions & Answers

Last Modified Date for subfolders

Sorry for the basic question, but I have a feeling that my developers are circumventing our change control process, and I want to be able to easily keep track of the last modified date of sub-folders of the production folder. Basically, we have this major folder PROD, and then each application... (1 Reply)
Discussion started by: saint01
1 Replies

8. Shell Programming and Scripting

How to create folders/subfolders using shellscript

Hi, Can any one help me how to create folders using shellscript.My requirement is: FolderName: Main/Main1 :Main/Main2 :Main/Main3 underSubFolder : Main1/A :Main1/B :Main1/C underSubfolder: A/A1 ... (2 Replies)
Discussion started by: ram2s2001
2 Replies

9. UNIX for Dummies Questions & Answers

rename files in subfolders

Hello i have this script : foreach f ($1/*.cpp ) mv $f $f:r.c end that renames me files in dir , how can i change it so it will rename me also in subdirectorys? thanks (0 Replies)
Discussion started by: umen
0 Replies

10. UNIX for Dummies Questions & Answers

TAR (Extract with subfolders)

Hi! I've uploaded a .tar file (created with Windows) containing my homepage to my webserver. Now I'd like to extract the file on the server. I can do that with SSH. BUT:: If i enter this command: tar -xf homepage.tar only the files in the root directory of the file get extracted.... (2 Replies)
Discussion started by: roberthawke
2 Replies
Login or Register to Ask a Question