Find the answer to your Linux question:
Results 1 to 5 of 5
When a file is saved or modified in some manner, the modified date is changed. I have 2 questions, is that taken care of automatically by the os when a ...
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3

    file modification date

    When a file is saved or modified in some manner, the modified date is changed. I have 2 questions, is that taken care of automatically by the os when a program changes it?

    And when a file is saved, sometimes it's a large file or it takes a while to save. In gedit even in a tiny text file, it says 'saving' at the bottom for a few seconds. Is the file modification date updated at the beginning or end of the write?

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

    Exclamation

    I don't understand your question exactly,but here is more info:

    time changes are done to file inode by OS (the kernel). Date modification will be done while writing meta data back to disk.

    does that answer your question?
    - 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
    -------------------

  3. #3
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3
    Ok, then I'm asking, is the date modification done before or after the meta data has been written?

    If it's a large piece is the meta data split into pieces? If so, is the date update initiated with each piece or at the start or at the end?

    (I guess this next question could be derived from the answers of above)
    If a program checks and the date has been updated, does that mean the file is not being written to anymore (assuming another process doesn't initiate another write to the file in the in term)?

  4. #4
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    is the date modification done before or after the meta data has been written?
    Time stamps will be found in File's Meta data (which is inode).
    Data blocks refers to file contents.Kernel will write the file contents first (that's Data
    block ) and then update the inode.

    If a program checks and the date has been updated, does that mean the file is not being written to anymore
    inode update will be done once file contents are stored in disk. If the file is opened by a single process,then updation is said to be over/completed.
    - 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
    -------------------

  5. #5
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3
    Thanks
    That answers it all.

Posting Permissions

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