How Can I Copy Files and Keep the Original Creation Dates?
Asked by
balcony tomatoes
I'm trying to copy some files into a new folder on a different drive, but I've noticed that the original "creation date" gets reset to today's date when I do that. This mix-up leads to organizational headaches since keeping track of original creation dates is really important for me. Is there any method to copy files while making sure the creation dates remain intact? Also, I'm using Plasma, in case that's relevant.
Answers
Unfortunately, you can't set the creation date manually on Linux filesystems like ext4 or btrfs. Those filesystems automatically register the creation date when the inode is created, and it can't be changed easily. So, you wonโt be able to preserve the original creation date when copying files, unfortunately.
Reply to this answer
Rsync is your friend here! It can preserve timestamps and other metadata when copying. Just check the options with the `--help` command; there are a lot! For basic use, just running `rsync -a source/ destination/` should do the trick.
Reply to this answer
If you're open to some workarounds, one simple way is to zip the files before copying and then unzip them in the new location. The KDE file manager has options for zipping and unzipping. Alternatively, if you're comfortable using the command line, try using the `cp -p` commandโthis keeps the timestamps intact. For example: `cp -p original_file /path/to/destination`. If you're feeling adventurous, you can also use `tar` to create an archive directly to the destination without needing extra storage.
Reply to this answer
If you copy and paste, yes, the creation timestamp will reset to the current date. However, moving the files from one place to another should preserve their timestamps. If you need to keep track of them, consider renaming files to include the original date in the filename, or use a tool like KRename to easily rename files in bulk. You could also create a text document listing out the files and their timestamps as a last resort.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions