Find Command Need Help
I need some help using the find command.
I checked out the man pages...confusing for a newbie. I would like to search the system and get a list of all files which were changed within the past 20 day. I tried a few things but the syntax didn't work. Any help will be appreciated. Thanks. |
Below is an example of what you can find by doing a Google search. Even though is shows the man page, which can be hard to understand, a lot of time you can find examples to work with.
http://www.computerhope.com/unix/ufind.htm Good luck |
Thanks but I already checked this out and I can't figure out the correct systax.
|
What did you try? If you post what you've tried, and any error messages you got, people are more inclined to tell you where you've gone wrong.
The page below has an example of how to use find to search for things which have been modified within the last x number of days: http://www.hccfl.edu/pollock/Unix/FindCmd.htm Hint: use your browser's find command to search for "time" in that page. |
From the man page:
Code:
-mtime n I think this is the command you want: find /path/to/whatever -mtime 20 |
find . -mtime 0 # find files modified within the past 24 hours
find . -mtime -1 # find files modified within the past 24 hours find . -mtime 1 # find files modified between 24 and 48 hours ago find . -mtime +1 # find files modified more than 48 hours ago find . -mmin +5 -mmin -10 # find files modifed between 6 and 9 minutes ago So I guess you want: find . -mtime -20 |
All times are GMT -5. The time now is 09:48 AM. |