The UNIX and Linux Forums  

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

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-19-2004
Registered User
 

Join Date: Sep 2004
Posts: 78
Wink 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
Reply With Quote
Forum Sponsor
  #2  
Old 09-19-2004
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
In response to your first question, an "ls -R *.exe" should yield the required files

Cheers
ZB
Reply With Quote
  #3  
Old 09-19-2004
Registered User
 

Join Date: Sep 2004
Posts: 78
Wink 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

try on ;-) pleaz..
Reply With Quote
  #4  
Old 09-20-2004
Registered User
 

Join Date: Sep 2004
Posts: 78
Thumbs up 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

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
Reply With Quote
  #5  
Old 09-20-2004
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
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
Reply With Quote
  #6  
Old 09-20-2004
Registered User
 

Join Date: Sep 2004
Posts: 78
Arrow

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.

Reply With Quote
  #7  
Old 09-20-2004
Registered User
 

Join Date: Sep 2004
Posts: 78
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....
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
mtime

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 02:55 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0