- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Change date and time to 2 days ago.
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
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
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-28-2008 10:09 AM
07-28-2008 10:09 AM
I'd like to change date and time for all files below /apps2 and subdir to (Example) June, the 30th 2008 00:00:00
How to do this, something like that with find and touch ?
Thanks in advance
Regards
Den
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2008 10:13 AM
07-28-2008 10:13 AM
Re: Change date and time to 2 days ago.
This is done with the date command.
The command itself includes help and syntax.
If you do this with a running, open oracle database the database will crash and possibly be damaged.
You must bring critical services down before you do this.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2008 10:17 AM
07-28-2008 10:17 AM
SolutionYes, use 'touch' to change a file's timestamp.
Now the question is, *whicH* timestamp? You can alter the lastaccess or the last modification ('-a' or '-m' respectively) but you cannot change the last "change" timestamp that you see with 'ls -c'.
# touch -at 06300000 myfile
...sets the lastaccess timestamp
# touch -mt 06300000
...sets the last modification timestamp
Add '-c' to the 'touch' command to prevent creating non-existent arguments.
See the manpages for 'touch' for more details!
For you question, you might do:
# find /apps2 -xdev -exec touch -amt 06300000 {} \+
Regards!
...JRF...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2008 10:17 AM
07-28-2008 10:17 AM
Re: Change date and time to 2 days ago.
No, It's just for flat files.!
But the remark is pertinent for all players here !
Regards
Den
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2008 10:32 AM
07-28-2008 10:32 AM