cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
UNIX/Linux Programming
how can i get sectors locations related
how can i get sectors locations related to a file in C/C++
Jun 1, 2011 at 6:42pm UTC
mohamedrks
(13)
I want to know how can i get the sectors details related to a single file by giving it's inode number or something.
Jun 1, 2011 at 8:00pm UTC
Athar
(4466)
You can use an ioctl call with parameter FS_IOC_FIEMAP to get its extent map.
This isn't supported by all file system, but it works with ext4 in any case.
Taking a look at the filefrag source code should help getting to know how to use the calls.
Jun 1, 2011 at 9:45pm UTC
tracy386hunter
(1)
Nobody said thanks to you Athar. So I'll say it.. Thanks.. =) I'm just a newbie here
Topic archived. No new replies allowed.