# Any way to recover “date modified” in a directory listing from inside the file?

**URL:** <https://boards.straightdope.com/t/any-way-to-recover-date-modified-in-a-directory-listing-from-inside-the-file/533336>\
**Category:** Factual Questions\
**Created:** [March 22, 2010, 2:31pm UTC](https://boards.straightdope.com/t/any-way-to-recover-date-modified-in-a-directory-listing-from-inside-the-file/533336 "2010-03-22T14:31:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rhythmdvl](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rhythmdvl](https://boards.straightdope.com/u/Rhythmdvl)\
**Post date:** [March 22, 2010, 2:31pm UTC](https://boards.straightdope.com/t/any-way-to-recover-date-modified-in-a-directory-listing-from-inside-the-file/533336/1 "2010-03-22T14:31:01Z")

</div>

Sorry for the awkward OP, I hope it was somewhat clear.

The backstory: We had a Linux file server. Prior to moving everything from the Linbox to a new aftermarket file server (a [Synology DS209](http://www.synology.com/enu/products/DS209/index.php), if it makes a difference), a mass permissions change was done to all files. This changed every file’s “date modified” field to that day’s date.

This has caused all sorts of consternation. It’s still _possible_ to work some things out, but certainly not convenient. We have Macs, PCs, and a Linux box here, and we still have the original HDDs that held the now date-modified data. From any of those OSs, is there any chance that we can either get the date that pops up under File\>Properties to show up on the directory listing or sort by that date? What about searching by that date within particular applications (mostly Word, Quark, Photoshop, and Acrobat)?

Thanks,

Rhythm

---

<div class="post-metadata">

**Author:** ![Rysto](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@Rysto](https://boards.straightdope.com/u/Rysto)\
**Post date:** [March 22, 2010, 3:40pm UTC](https://boards.straightdope.com/t/any-way-to-recover-date-modified-in-a-directory-listing-from-inside-the-file/533336/2 "2010-03-22T15:40:06Z")

</div>

If you can mount the original disks on the new server somehow, you can use the following command to put the timestamps back:

touch -r /file/with/original/timestamp /file/with/incorrect/timestamp

You’ll have to write a script that will be able to find all of the files on the old disk(find is probably the command to use here) and map those files to the path to the files on the new disk.
