Is it possible to manually alter the date of a file on a UNIX system (to a previous date)?
If so, how would I tackle this problem?
How would I be able to do the same thing on multiple files at the same time?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You can use
touch -m -d '1 Jan 2006 12:34' test.txt
-m Change only the modification time -d (--date=STRING) with the date you want to put in
extracted from the manual:
DATE STRING The --date=STRING is a mostly free format human readable date string such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday". A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indicates the beginning of the day. The date string format is more complex than is easily documented here but is fully described in the info documentation.
for more info you can read the touch manual, running man touch.
i hope that helps.