Find the answer to your Linux question:
Results 1 to 5 of 5
hi , everyone. i want to get the block numbers of a file. Could you tell me which function can i use? thanx!...
  1. #1
    Just Joined! bitzsk's Avatar
    Join Date
    Apr 2009
    Location
    Far, Far, Away on the earth
    Posts
    25

    How to get the block numbers of a file ?

    hi , everyone.

    i want to get the block numbers of a file. Could you tell me which function can i use?

    thanx!

  2. #2
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    385
    I'm not entirely sure what you mean by block number, are you referring to the inode number?

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Exclamation

    block numbers are stored in file's inode. They represent the location where the files contents are stored.
    I would suggest downloading e2fsprogs and spending some time "debugfs" command will help you a lot -e2fsprogs has library that allows all activities with FS. If you want access blocks in "unprofessional messy way" you can check my tool giis source codes
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  4. #4
    Just Joined! bitzsk's Avatar
    Join Date
    Apr 2009
    Location
    Far, Far, Away on the earth
    Posts
    25
    Quote Originally Posted by Lakshmipathi View Post
    If you want access blocks in "unprofessional messy way" you can check my tool giis source codes
    thanks!

    what's mean by unprefessional messy way?

  5. #5
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Post

    giis code doesn't use standard libraries to access FS. Whereas almost all other tools use e2fsprogs library.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...