On a list of large binary files, I want to update the atime to current time, but not affect the ctime nor mtime. (This will be an ongoing daily process).
touch -a foo
updates the atime, but it also updates the ctime which I do not want.
head -1 foo > /dev/null
works, but since the file is not divided by "lines", it takes a relatively long time.
The following accomplishes my goal, and works quickly even on a 400 MB file, but I am not sure if it is the best way to approach this. Any feedback is welcomed.
od foo | head -1 >/dev/null
Thanks, JimR
should work (works on my ext4 drive) - not sure why you would have the ctime change along with it.