- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: touching a file with date in past.
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
тАО07-19-2004 09:38 PM
тАО07-19-2004 09:38 PM
I need to find all files since a time a number of days ago. I currently use this to create a file dated at midnight
touch -t `eval "date +'%y%m%d0000'"` todayfile
and I then use find using the newer keyword.
What I now need is the ability to create a file dated midnight two days previously.
Thanks in advance.
Dave
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2004 10:04 PM
тАО07-19-2004 10:04 PM
SolutionThere may be two solutions for you :
. Install and use GNU date, wich is the same with more options. It may help you with options such as "date --date='2 days ago'".
. Use a script that is often mentioned here. Its name is something like calj or calij. I'm experiencing problems whith searching on HP site, but you may find threads in ITRC dealing with it.
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2004 10:13 PM
тАО07-19-2004 10:13 PM
Re: touching a file with date in past.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2004 11:26 PM
тАО07-19-2004 11:26 PM
Re: touching a file with date in past.
Use the touch command as like,
touch -t `echo $dayinfo` todayfile
It will do your requirement.
NOTE: Year is calculated as yy ( 04 ) not as 2004
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2004 12:38 AM
тАО07-20-2004 12:38 AM
Re: touching a file with date in past.
What about bissextile years in your script ? (don't know if it's the correct word in english : year with 366 days)
Regards,
Fred
"Reality is just a point of view." (P. K. D.)