Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
Resource icon

About ext4 Linux timestamps maybe

In some Linux there is no way to set created at or changed at timestamps on mounted systems. NOTE: ONLY USE DEBUGFS ON UNMOUNTED SYSTEMS. There is however debugfs. If you want to set times there are 2 or more things to set. With creation time there is crtime and crtime_extra, first is to second precision and second is nanoseconds times 4. Second precision times are with this format of YYYYMMDDHHmmSS +%Y%m%d%H%M%S year month day hour minute second or hexadecimal seconds since epoch with "@0x" before them, and in UTC time zone to set.

There is also times with "i_" or "st_" in front and related extra. On some distros "btime" may replace "crtime" and/or "chgtime" may replace "ctime". To tell what you can set, use "sif -l". To set, use "sif (path inside unmounted file system) (field to set) value" inside debugfs. There are at least 3 ways to use debugfs, just debugfs to /dev/something, you stay in until you use quit, with -f so it does all commands in a file, or with -R so you may execute a single command and exit. Use -w if you want to change anything. Refer to "man debugfs" as used in terminal for more information. debugfs is very dangerous so use it wisely. That is not to say that debugfs is not safe as used correctly. debugfs is for Linux with ext2 to ext4 file systems. This debugfs may be used in Bash. This information should be valid but I do not claim responsibility for your usage. X E.
Author
JosiahMaybe
Views
505
First release
Last update

Ratings

0.00 star(s) 0 ratings
Back
Top Bottom