Quantcast
Channel: Dev Blog
Viewing all articles
Browse latest Browse all 10

Reset file's modification time to their birth time

$
0
0

NOTE:This only works for FreeBSD.

This will change the modification time (ls -l) of the current directory and all files and directories under it back to their "birth time" (creation time). If you want to limit this use man find to figure out the proper arguments.

find . -exec sh -c 'touch -t $(date -r $(stat -f %B {}) "+%Y%m%d%H%M.%S") {}' \;


Viewing all articles
Browse latest Browse all 10

Trending Articles