- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- File time check
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
Forums
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
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
тАО05-24-2004 04:29 AM
тАО05-24-2004 04:29 AM
File time check
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 04:31 AM
тАО05-24-2004 04:31 AM
Re: File time check
touch 200405240800 /tmp/afile
find . ! -newer /tmp/afile -print
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 04:36 AM
тАО05-24-2004 04:36 AM
Re: File time check
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 04:37 AM
тАО05-24-2004 04:37 AM
Re: File time check
touch -t 200405230815.30 /tmp/afile
Will set /tmp/afile last modify time to 5/23/2004 8:15:30
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 05:00 AM
тАО05-24-2004 05:00 AM
Re: File time check
Date2Match=`expr $CurrentDate - 60`
touch -t $Date2Match myfile.$$
find ... -newer myfile.$$ ...
rm myfile.$$
... or something like that :)
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
тАО05-24-2004 05:12 AM
тАО05-24-2004 05:12 AM
Re: File time check
perl -e 'use File::Find; find(\&wanted,"."); sub wanted { print $File::Find::name,"\n" if (stat($_))[9] < time-3600; }'
This will print files under the current directory that are more than 60 minutes old.
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 05:24 AM
тАО05-24-2004 05:24 AM
Re: File time check
CurrentDate=`date +%Y%m%d%H%M`
Date2Match=`expr $CurrentDate - 60`
touch -t $Date2Match myfile.$$
find ... -newer myfile.$$ ...
rm myfile.$$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 05:57 AM
тАО05-24-2004 05:57 AM
Re: File time check
you could change your timezone.
such as this, if your in the us eastern timezone.
oldTZ="$TZ"
TZ="CST6CDT"
TZ="$oldTZ"
now=$(date +format)
touch -t "$now" file
etc...
for a more generic solution, you'll probably want to write a perl script to be able to subract an abitrary amount.
or you could use Mr. Stephenson's calendar script from this site at the bottom of the page
http://mirrors.develooper.com/hpux/