|
From: | Holger Klene |
Subject: | bug#18214: How to copy modification date with cp? |
Date: | Thu, 07 Aug 2014 11:42:52 +0200 |
User-agent: | KMail/4.13.3 (Linux/3.13.0-32-generic; KDE/4.13.3; x86_64; ; ) |
Hello!
I'd like to copy photos from my harddrive to an external USB-drive for my parents. As there are many more photos on my harddrive, that I don't want to copy to my parents, I created a view folder with symbolic links that point exactly to the folders my parents should get.
Now I copy the contents of the view-folder over to the USB-drive with: cp -vLRu viewForMyParents usb
After some time, more folders are added and I plan on repeating the copy command to update the usb-drive with the latest additions.
The problem is, all files and folders get a timestamp of the moment, when the copy took place instead of the original files timestamp.
I reproduced the setup and took a screenshot (cp-error.png). Only that the tar did not preserve the symbolic links inside test/myHardDrive/viewForMyParents/
My question is, how can I make cp not updating the timestamps to the moment of the copy (e.g. 11:00) but instead let it copy the original files last modified (e.g. 10:something)?
Thanks Holger
PS: This is Kubuntu 14.04 with cp (GNU coreutils) 8.21
-- |_|/ MfG | |\ Holger Klene
PGP Key ID: 0x22FFE57E |
signature.asc
Description: This is a digitally signed message part.
test.tar.gz
Description: application/compressed-tar
cp-error.png
Description: PNG image
[Prev in Thread] | Current Thread | [Next in Thread] |