LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > maybeJosiah
User Name
Password

Notices


Rate this Entry

Timestamps all Linux setting maybe

Posted 02-02-2024 at 05:12 PM by maybeJosiah
Updated 02-02-2024 at 08:55 PM by maybeJosiah (ZFS)

On Linux there are ways to set changed at time and created at time for files. For example:
xfs_db -c "inode <inode_number>" -c "chattr <new_change_attribute>" /dev/<device_name>

That is for chaned at on XFS.
BTRFS:
chattr --ctime="2022-01-01 12:00:00" filename
ZFS:
zfs set creation=2022-01-01T00:00:00 pool/dataset/file

Test this before large scale but these things may do setting changed at time except ZFS which is created at. Assume you must do this on unmounted systems but do your own research. I also researched man pages.
https://linux.die.net/man/8/xfs_db
https://linux.die.net/man/8/zfs

So there are ways to set BTRFS, XFS, and others like ZFS or F2FS. I heard stuff like these and debugfs works on F2FS. I have not tested these so these are just research for now. With that all timestamps that are on systems can be recorded and reset. I know rsync supports -N, created at, and -X, extra attributes, but some attributes may not always be copied on all systems. "touch" can set last modified and last accessed. Timestamps that require like debugging tools are changed at and created at. Be careful as some attributes may have an extra and just set as seconds. How people live without ease of transfer of timestamps and in some cases restore possibilities is mysterious. X E.
Posted in Uncategorized
Views 104 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 05:13 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration