How to find physical location of a file on the HDD?
How would I find which physical sectors on the HDD a file occupies? I noticed that when I do:
Code:
ls -i |
What is the location of the file? There is inode (file metadata), extra xattr nodes (usually none), and data blocks. If your file is rather big (I think no FS has default block size of more than 16*1024 bytes on a HDD less than 1TB), it will have to be split. With some luck the fragments will be one near other on the disk, but there is some additional information in every block (like a pointer to the next block of the file).
I think GRUB is a good place to see FS read-only implementations |
In case anyone else is interested, I did find a solution to my question, so I thought I would post it. It turns out you can use the "filefrag" command to find the physical location of a file:
Code:
filefrag -v myfile.txt Code:
Checking myfile.txt |
All times are GMT -5. The time now is 11:15 AM. |