|
Search for files in multiple directories
I want to search for a file pattern in more than one directory. How I need to do that?
Here is the scenario:
I am having a directory structure like the following:
/log
...../20051001
..........ftp_server_20051001.log
..........ftp_down_server.log
..........ftp_up_server.log
...../20051101
..........ftp_server_20051101.log
...../20051201
..........ftp_down_server.log
..........ftp_up_server.log
...../20060101
..........ftp_down_server.log
..........ftp_up_server.log
...../20060201
..........ftp_server_20060201.log
...../20060301
..........ftp_down_server.log
..........ftp_up_server.log
..........ftp_server_20060201.log
...../20060401
..........ftp_down_server.log
..........ftp_up_server.log
I want to find out all the logs that start with "ftp_server" in the
year 2006 from the log directory.
Can some one help me with the command?
I used to try like: $ find . -name 2006*/ftp_server*. It listed only one
file information and quits with some error. I am looking for all the files
Thanks,
Ravi
Last edited by ravikirankethe; 10-25-2006 at 05:03 PM..
|