Hi,
with
$ date -r test
I get:
Di 10. Jan 22:39:14 CET 2017
but with
$ date -d "$(($(date -r test +%s)-$(date +%s))) seconds -2 months"
I get:
Sa 12. Nov 22:39:14 CET 2016I think the better result would be according to a calculation order from left to right:
Sa 10. Nov 22:39:14 CET 2016Otherwise it seems impossible to correctly change the time stamp of a file relative to its current value.
Example:$ touch -t $(date -d "$(($(date -r test +%s)-$(date +%s))) seconds -2 months" +%Y%m%d%H%M.%S) test
Additionally the command is not correctly reversible with:$ touch -t $(date -d "$(($(date -r test +%s)-$(date +%s))) seconds +2 months" +%Y%m%d%H%M.%S) test
Regards Ulf
smime.p7s
Description: S/MIME Cryptographic Signature
