5
votes
Accepted
using gnu date to set a time and format and subtract
info date 'date input formats' will tell you which date formats GNU date accepts as input (same online for the latest version of GNU coreutils).
And 09/Sep/24 05:02 AM is not one of the ones it ...
2
votes
using gnu date to set a time and format and subtract
To get it in the format of printing the shortened name of the month of year without seconds:
date "+%d/%b/%y %H:%M %I:%M %p" -d "1 hour ago"
Output:
09/Sep/24 19:11 07:11 PM
To ...
1
vote
Accepted
How to copy/rsync? old home folder from a full timeshift snapshot with original dates? possible? how?
It looks like you can use rsync (or cp) directly to copy the files exactly as usual.
This version would copy everything including dot files/directories:
cp -a /path/in/your/backup/to/your/home/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
date × 1180bash × 208
linux × 203
shell-script × 198
shell × 111
time × 89
files × 86
awk × 83
timestamps × 75
timezone × 75
text-processing × 69
command-line × 57
find × 51
scripting × 45
sed × 41
logs × 35
sort × 34
cron × 32
grep × 30
debian × 27
macos × 27
locale × 26
rename × 23
ubuntu × 20
solaris × 20