->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> "Bahram Alinezhad" (alineziad@yahoo.com) wrote: ---------- In DOS, we can search for files inside a directory and all its sub-directories with "/s" switch in "dir" command; For example: dir *.sys c:\windows /s Why can't similar operation be done with "ls" in linux? <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<- ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> "daniel" (danstemporaryaccount@yahoo.ca) wrote: ---------- 'cause linux has a better command. it's called "find": $ man find with it you can do neat stuff like search for files in <dir> matching <pattern> and then execute programs using those results as arguments etc. for what you asked for above, you can do this: $ find /path/to/wherever -name '*.sys' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<- Yes, "find" works well, however, I have a suggestion: "ls" command together with "--ignore" option can ignore patterns; What would happen if there was an option to *follow* patterns? Thank you for your help, Bahram Alinezhad, Rudehen, Tehran, Iran. __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo
ls -R | grep "file" -----Oprindelig meddelelse----- Fra: Bahram Alinezhad [mailto:alineziad@yahoo.com] Sendt: 30. oktober 2004 20:39 Til: suse-linux-e@suse.com Emne: Re: [SLE] dir /s ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> "Bahram Alinezhad" (alineziad@yahoo.com) wrote: ---------- In DOS, we can search for files inside a directory and all its sub-directories with "/s" switch in "dir" command; For example: dir *.sys c:\windows /s Why can't similar operation be done with "ls" in linux? <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<- ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> "daniel" (danstemporaryaccount@yahoo.ca) wrote: ---------- 'cause linux has a better command. it's called "find": $ man find with it you can do neat stuff like search for files in <dir> matching <pattern> and then execute programs using those results as arguments etc. for what you asked for above, you can do this: $ find /path/to/wherever -name '*.sys' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<- Yes, "find" works well, however, I have a suggestion: "ls" command together with "--ignore" option can ignore patterns; What would happen if there was an option to *follow* patterns? Thank you for your help, Bahram Alinezhad, Rudehen, Tehran, Iran. __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Bahram Alinezhad wrote:
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> "Bahram Alinezhad" (alineziad@yahoo.com) wrote: ---------- In DOS, we can search for files inside a directory and all its sub-directories with "/s" switch in "dir" command; For example:
dir *.sys c:\windows /s
Why can't similar operation be done with "ls" in linux?
ls -R
participants (3)
-
Bahram Alinezhad
-
James Knott
-
Tage Danielsen