If you ever needed to arbitrarily change the access and modification times on a file, here's how to do it. I can see this being useful when you are performing a find event. You can also use a reference file to set the times on a target file or directory.
Here's the time set to
#touch -t 200704101816 filename
#settime -f reference_file target_filename
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
Wednesday, April 11, 2007
Change Access and Modification Times on a File
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment