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: 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!
Login / Register
-
Factorio devs detail their 'Linux adventures' in a new …
- Kandarihu -
SteamVR Beta gets Linux fixes, plus Beta updates for De…
- TheRiddick -
The big hit medieval strategy game Manor Lords works we…
- redneckdrow -
The big hit medieval strategy game Manor Lords works we…
- rustigsmed -
Ubuntu 24.04 LTS (Noble Numbat) is now available
- F.Ultra - > See more comments
Latest Forum Posts
- Nintendo-style gaming, without Nintendo!
- Smoke39 - Penguins in Gaming
- Pengling - Weekend Players' Club 4/26/2024
- Mezron - Free Steam Keys!
- robvv - Company of Heroes 2 Benchmark
- Vortex_Acherontic - See more posts
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