how to change last modification time

eklass

Golden Member
Mar 19, 2001
1,218
0
0
is there a way to roll back the last modification time of a file in a unix/linux environment?

where might i look for answers? thanks
 

pac1085

Diamond Member
Jun 27, 2000
3,456
0
76
I'm not sure what you mean...do you want to change the timestamp on the file?

Unlike the ads to the left, you could try 'man touch'
 

eklass

Golden Member
Mar 19, 2001
1,218
0
0
i don't want to touch a file. i want to pre-mark the file. like if the file is timestamped at 1700, i might want to roll it back to 1400 or something :)

how about trying "man goawayads"
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
from the man file for touch:

-t time

Use the specified time as the new value for the changed timestamp(s).
The argument is a decimal number of the form [[CC]YY]MMDDhhmm[.SS]


Otherwise I am not sure what your talking about
 

eklass

Golden Member
Mar 19, 2001
1,218
0
0
Originally posted by: drag
from the man file for touch: -t time Use the specified time as the new value for the changed timestamp(s). The argument is a decimal number of the form [[CC]YY]MMDDhhmm[.SS] Otherwise I am not sure what your talking about

so specifying it with the t argument allows me to change it to any time?

vortex: sorry if that's what you mean, i was unaware of arguments for touch. i always just did "touch file"
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
yep:

drag> touch poo

drag> ls -l poo

-rw-r--r-- 1 drag users 0 Apr 22 18:07 poo

drag> touch -t 01010101 poo

drag> ls -l poo

-rw-r--r-- 1 drag users 0 Jan 01 01:01 poo


How that?