Kevin O Riordan wrote:
>>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.
ctime is not user changeable. It's not creation time, its inode
modification time (as opposed to data modifiation time).
Hence when the [am]time is changed explicitly the ctime will
be updated automatically.
Padraig.
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!