changing lots of file dates?
Ralf Mardorf
kde.lists at yahoo.com
Fri Jul 29 09:19:36 UTC 2022
On Fri, 29 Jul 2022 02:32:06 -0400, Jon LaBadie wrote:
>There is no simple way I know of to modify mod time without
>also setting inode change time to the current time.
Hi,
using "touch" is what I recommend, too [1].
I did not think about change time, but you are right and this
"limitation" makes sense.
That reminds me of my C64 times. A "disk monitor" could be used to read
or write disk content. However, without any special tool that might
allow to edit an ext4 inode table, a workaround would be to shutdown
the machine and boot a live Linux, then "touch" the files after changing
the system time, IOW make the current time, the time of the original
file's change time. When finished, before shutting down the live Linux,
sync the machine to a time server, to get back the real current time,
before booting the Linux install of the machine.
Regards,
Ralf
[1]
[rocketmouse at archlinux ~]$ man touch | grep -e"only the modification" -e"instead of current time" -B1
-d, --date=STRING
parse STRING and use it instead of current time
--
-m change only the modification time
--
-r, --reference=FILE
use this file's times instead of current time
--
-t STAMP
use [[CC]YY]MMDDhhmm[.ss] instead of current time
More information about the ubuntu-users
mailing list