> touch changes the mtime or optionally atime
> not ctime.
According to the manpage, touch changes "the access and modification
times of each FILE to the current time". Or optionally (with -a),
"-a change only the access time".
Funnily enough though, when I run touch, it seems to update the ctime
too.
[kor at hoth kor]$ touch newfile
[kor at hoth kor]$ stat newfile|grep '\(Access\|Modify\|Change\)'
Access: Tue Feb 12 13:54:05 2002(00000.00:00:13)
Modify: Tue Feb 12 13:54:05 2002(00000.00:00:13)
Change: Tue Feb 12 13:54:05 2002(00000.00:00:13)
[kor at hoth kor]$ touch newfile
[kor at hoth kor]$ stat newfile|grep '\(Access\|Modify\|Change\)'
Access: Tue Feb 12 13:54:21 2002(00000.00:00:01)
Modify: Tue Feb 12 13:54:21 2002(00000.00:00:01)
Change: Tue Feb 12 13:54:21 2002(00000.00:00:01)
[kor at hoth kor]$ touch -a newfile
[kor at hoth kor]$ stat newfile|grep '\(Access\|Modify\|Change\)'
Access: Tue Feb 12 13:54:52 2002(00000.00:00:05)
Modify: Tue Feb 12 13:54:35 2002(00000.00:00:22)
Change: Tue Feb 12 13:54:52 2002(00000.00:00:05)
[kor at hoth kor]$ touch -a newfile
[kor at hoth kor]$ touch --version
touch (GNU fileutils) 4.0
Not running any funny mount options here neither. Odd.
-kev
On Pungenday, the 43rd day of Chaos, Padraig Brady roared:
> Justin MacCarthy wrote:
> >Here is what I did:
> >
> >(I created the folder and 3 files. )
> >
> >macarthy at Shaftoe /c/testfiles
> >
> >$ ls -la
> >total 34
> >drwxr-xr-x 2 macarthy None 0 Feb 12 12:37 .
> >drwxr-xr-x 62 macarthy None 28672 Feb 12 12:36 ..
> >-rw-r--r-- 1 macarthy None 1393 Feb 12 12:36 test1.txt
> >-rw-r--r-- 1 macarthy None 1393 Feb 12 12:37 test2.txt
> >-rw-r--r-- 1 macarthy None 1393 Feb 12 12:37 test3.txt
> >
> >
> >(Touched the test1.txt )
> >
> >macarthy at Shaftoe /c/testfiles
> >$ touch -t 02111200 test1.txt
>>> Padraig
>>> --
> Irish Linux Users' Group: ilug at linux.ie>http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> List maintainer: listmaster at linux.ie
--
try do, no or not. is do there
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!