How to hack to change the created and modified date of a file

We can do this trick with a single terminal command.

first dive into the directory where the file is stored.
touch -t YYYYMMDDhhmmss fileName.extension

Done, if the time you entered is before the original created time, both created and modified time would be changed to the new time assigned. However, if the time you entered is after the original created time, only the modified time would be affected.

eg. There is a file, test.doc, on your Desktop. Continue reading “How to hack to change the created and modified date of a file”