Skip to main content
deleted 2 characters in body; edited tags
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 266

I have a bunch of files in a directory where the modification time was changed (incorrectly) with touch -m

The access time of these files is still close enough to what the modification time was, so I'd like to change them back.

Is there a way of doing a touch where it sets the mtime = atime? I don't want to set them all to the same timestamp, but I want to go file-by-file setting mtime = atime...

I have a bunch of files in a directory where the modification time was changed (incorrectly) with touch -m

The access time of these files is still close enough to what the modification time was, so I'd like to change them back.

Is there a way of doing a touch where it sets the mtime = atime? I don't want to set them all to the same timestamp, but I want to go file-by-file setting mtime = atime...

I have a bunch of files in a directory where the modification time was changed (incorrectly) with touch -m

The access time of these files is still close enough to what the modification time was, so I'd like to change them back.

Is there a way of doing a touch where it sets the mtime = atime? I don't want to set them all to the same timestamp, but I want to go file-by-file setting mtime = atime.

Source Link
Joe
  • 113
  • 4

Changing file modification time to access time in bulk

I have a bunch of files in a directory where the modification time was changed (incorrectly) with touch -m

The access time of these files is still close enough to what the modification time was, so I'd like to change them back.

Is there a way of doing a touch where it sets the mtime = atime? I don't want to set them all to the same timestamp, but I want to go file-by-file setting mtime = atime...