[ale] Modification Date
Charles Shapiro
hooterpincher at gmail.com
Wed Mar 14 09:32:31 EDT 2007
touch <filename> will change the modification date to the current date.
"touch --t 195502171433 filename" will change the access and modification
times to February 17, 1955 at 2:30 in the afternoon. Other options will
change only the access time.
The creation time (given by "ls -lc") will remain unchanged. Hence:
cshapiro at gt8adm1:/tmp> uname -a > foo.txt
cshapiro at gt8adm1:/tmp> ls -l foo.txt
-rw-r--r-- 1 cshapiro cartoon 100 2007-03-14 09:29 foo.txt
cshapiro at gt8adm1:/tmp> touch -t 195802171433 foo.txt
cshapiro at gt8adm1:/tmp> ls -l foo.txt
-rw-r--r-- 1 cshapiro cartoon 100 1958-02-17 14:33 foo.txt
cshapiro at gt8adm1:/tmp> ls -lc foo.txt
-rw-r--r-- 1 cshapiro cartoon 100 2007-03-14 09:29 foo.txt
cshapiro at gt8adm1:/tmp>
Most applications in my experience use the access time.
-- CHS
On 3/14/07, Jim Philips <briarpatch.jim at earthlink.net> wrote:
>
> On Wednesday 14 March 2007 01:53:03 am Terry Bailey wrote:
> > Hi,
> >
> > How do you change the modification date on a Linux file?
> >
> > Thanks,
> >
> > Terry Bailey
>
> touch <filename>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ale
mailing list