- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Find files that modified on yesterday recursiv...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2001 06:29 PM
тАО06-07-2001 06:29 PM
How to find files that had been modified on yesterday recursively?
Thanks ina advance,
YC
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2001 06:39 PM
тАО06-07-2001 06:39 PM
Re: Find files that modified on yesterday recursively
See if this works for you (since 'find' recursively descends the directories in its path):
# cd
# find . -xdev -mtime +1 -print
See the man pages for 'find' for a complete explanation of these, and other, options.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2001 10:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2001 09:56 AM
тАО08-15-2001 09:56 AM
Re: Find files that modified on yesterday recursively
Sorry to disagree but:
"find -mtime +n" selects files with a modification time > (n x 24) hours old.
"find -mtime -n" selects files with a modification time < (n x 24) hours old.
"find -mtime n" selects files with a modification time for the 24 hour period that begins (n x 24) hours in the past.
In all cases find uses the time when it runs as the point of reference.
For example:
"find . -mtime 0" will select all files modified within the previous 24 hours
"find . -mtime 1" will select all files modified within 24 - 48 hours ago
You cannot use find by itself to select the files modified yesterday because yesterday is from midnight to midnight and find is based on multiples of 24 hour periods from the time when it runs.
Further examples:
All files older than 1 week:
find -mtime +7
All files less than 1 week old:
find -mtime -7
All files that were modified more than 7 days but less than 8 days ago:
find . -mtime 7
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2001 10:20 AM
тАО08-15-2001 10:20 AM
Re: Find files that modified on yesterday recursively
You may also try this:
ls -lR | awk '{ if ($6 == "Aug" && $7 == "14") ptint $NF,$6,$7 }' > /tmp/filelist
this will search the whole machine for the files created /modifued for that date. Please monitor /tmp in case there are more files.
All the best.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2001 11:14 AM
тАО08-15-2001 11:14 AM
Re: Find files that modified on yesterday recursively
To do this as stated you really need to find the files modified between local midnite and the previous midnite. Here is a perl script that does just that starting in the current directory and outputting all files modified yesterday.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2001 11:33 AM
тАО08-15-2001 11:33 AM
Re: Find files that modified on yesterday recursively
If you find that the 24-hour granularity of the 'mtime' argument to 'find' is not sufficiently fine for your needs, then you can use the 'newer' option of 'find'. Create a reference file with 'touch' choosing the date and time you need as your 'find' boundry point. You can use positive or negative logic. See the man pages for 'find' for further information.
Regards!
...JRF...