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") {}' \;