Sunday, October 18, 2015

Effects of various commands on the output of file.info in R

Mac OS X (10.10)

# cmd                               # affected timestamp
touch f1                            mtime, ctime, atime
echo hi >  f1                       mtime, ctime 
echo hi >> f1                       mtime, ctime
rm f1; touch f1                     mtime, ctime, atime

Ubuntu Linux (15.04)

The same as OS X.

# cmd                               # affected timestamp
touch f1                            mtime, ctime, atime
echo hi >  f1                       mtime, ctime 
echo hi >> f1                       mtime, ctime
rm f1; touch f1                     mtime, ctime, atime

Windows 8 through cygwin

# cmd                               # affected timestamp
touch f1                            mtime, atime
echo hi >  f1                       mtime
echo hi >> f1                       mtime
rm f1; touch f1                     mtime, ctime

In conclusion, the common denominator is mtime.

0 comments: