So i was just playing with files like opening with hex editor and doing some stuff. and i found one thing…
i can access the data stored in a file but where are the metadata like file property, time stamps and other things are stored?
it’s definitely not stored inside the file but where it is? is it stored somewhere in HardDrive filesystem or anywhere else? i also noticed that the NTFS file system can also store permissions like i can use dos command cacls (or icacls) on NTFS filesystem but it does not support filesystems like FAT32.
and if it is on the harddrive then we can change the metadata (file properties hidden,archive etc) using linux (am i right)?
please can someone explain or tell me where i can find the right information about this topic.
Metadata stored separately from file data. Usually in structures called
inode, but its depends on filesystem used. On Linux, you work with meta data through API provided through functionchmod(2),chown(2) etc. Number in parentheses is section number, you read about these with man command:man -s2 chown. For command-line, linux have commands with similar names (chmod, chown, touch, etc).