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

In response to your first question, an "ls -R *.exe" should yield the required files

Cheers
ZB

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 :rolleyes:

try on :wink: pleaz..

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 :wink:

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

Following on from Drivers post above, you could use

find . -name "*.exe" -exec ls -l {} \;

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

Cheers
ZB

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.

:rolleyes:

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

mkdir -p users/test2/a1
mkdir -p users/test2/a2
mkdir -p users/test2/a3

is not the solution ????

sry if u understood diffrently ;

I just don't wanna create hundreds of subfolders.....more like "reading folders and writing folders", like a batch or so....not knowing how the subfolders all are called

:wink:

pwd>file1
mkdir -p `cat file1`

...didn't make it. without -p you can see that the system wanna create a folder (users/test1), but logical the folder already exists.

so it should be a loop like...

....
cd users/test1
pwd>file1
sed -e 's/test1/test2' file1 > file2
mkdir -p `cat file2`
....

-----------------------------------------------------------------------

by the way, how getting an input of a folder in a shell?

...
read fold1
$fold1 >file1
...

-----------------------------------------------------------------------

how it is possible to check date and time of some files?

just find files, that were created only a few minutes ago...

...

find . -name "*.exe" |sort -ctime 1

...

------------------------

cya...

yes!

thx goes to 'Driver' who made it...

some missing marks (/ `) made it a little bit difficult..
...
pwd>file1
sed -e �s/test1/test2/� file1>file2
mkdir -p `cat file2`
...
read fold1
echo "$fold1" >file1
...
find . -name "*.exe" -mtime -1
...

:wink: ciao!...