While you're here, please consider supporting GamingOnLinux on:
Reward Tiers:
Patreon. Plain Donations:
PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Reward Tiers:
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register
- Nexus Mods retire their in-development cross-platform app to focus back on Vortex
- Steam Frame and Steam Machine will be another good boost for Flatpaks and desktop Linux overall too
- Canonical call for testing their Steam gaming Snap for Arm Linux
- Windows compatibility layer Wine 11 arrives bringing masses of improvements to Linux
- European Commission gathering feedback on the importance of open source
- > See more over 30 days here
- Welcome back to the GamingOnLinux Forum
- Klaas - A New Game Screenshots Thread
- JohnLambrechts - Will you buy the new Steam Machine?
- mr-victory - Game recommendation?
- JSVRamirez - Weekend Players' Club 2026-01-09
- Minoscereb - See more posts
How to setup OpenMW for modern Morrowind on Linux / SteamOS and Steam Deck
How to install Hollow Knight: Silksong mods on Linux, SteamOS and Steam Deck
Last edited by damarrin on 28 May 2021 at 7:08 pm UTC
I need the copy to be a perfect clon.
I don't think Lutris cares about ctimes though, so I guess you have some other reason to worry about it.
From manual page:
-p implicts --preserve=mode,ownership,timestamps
It's my translation to English, so sorry it was wrong. I have localized manuals.
--preserve=timestamps should also do the trick.
cp -pP
It will copy symbolic links content instead location it points to. The -P do the trick.
From manual
-P, --no-dereference
never travel through symbolic links in source
What is more fast? The use of cp or Rsync?
Unless your doing one of those things, I find them to be about the same in terms of speed.
That's a clever idea! Although, wouldn't you have to alter the system time for every file just before you copy it to ensure every file has the same time as the old? I wonder if that's is scriptable in bash?
I can't remember what is called exsctly, but I think you might want to consider disabling the NTP deamon/service thing so the system doesn't automatically "fix" and resync to the correct time in the middle of you work. Or take the computer in question off the internet. Prolly easier to disconnect.
The script shouldn't be too complicated either. I'd guess it would just iterate over the files, grab the file ctime (inode change time, not to be confused with data modification time) with something like `stat -L --printf='%Z' [FILE]`, set the system time with `date +%s -s @[TIMESTAMP]`, then copy the file over. Rinse and repeat. This is probably a bit slower than a straight copy, but you don't have to copy the whole folder in one go.
The resulting timestamps will differ just slightly from the originals, because there'll be a tiny delay between you setting the time and the subsequent copy operation creating the target file. It's also possible that this does not even work. I haven't tested any of the above, and I'm not going to.
Stat might also be able to return the actual file "birth time" if your coreutils package is recent enough and you use a file system that stores it. You can grab that into a variable with `stat -L --printf='%W'`. Most Linux software doesn't read or make any use of this timestamp though.
Note that messing with your system time will mess up timestamps for any processes writing logs or files at the same time, so you might want to use a live USB so your actual system is unaffected. Or something like that.
If you end up actually doing this, you've certainly got my respect for the dedication. I still don't see the point, but who cares. Tinkering is fun.
Last edited by tuubi on 30 May 2021 at 1:24 pm UTC