Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-05-2005, 06:33 AM   #1
LQ Newbie
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
file modification in linux


Can anyone please tell me how linux saves a file(one that was already saved and is changed now). Does it simply overwrite the entire file or only overwrite the part that was changed.
Old 06-05-2005, 07:11 AM   #2
Registered: Jun 2005
Posts: 111

Rep: Reputation: 15
That depends on how the file was opened. The open() system call depends accepts flags that determine how the file will be handled. Have a look at the open() manual page to see what flags are available:

man 2 open

The developer of an application could have decided to append to a file, change the file, or completely rewrite a file from a buffer.
Old 06-05-2005, 07:20 AM   #3
LQ Newbie
Registered: Jun 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the suggestion. But my question was what the linux kernel does when asked to save a file( for eg: a text document which was modified )
Old 06-05-2005, 09:02 AM   #4
Registered: May 2003
Location: Wageningen, the Netherlands
Distribution: OS X & Linux Mint
Posts: 488

Rep: Reputation: 31
... my question was what the linux kernel does when asked to save a file ...
See File handling in the Linux kernel for a detailed complete description. According to the author you will need the following to understand:
... a working knowledge of C, and an understanding of the general principles of operating system design.
Hope that helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get file modification date/time in Bash script cmfarley19 Programming 16 04-15-2015 06:25 PM
Track File modification dhammika Programming 1 11-25-2005 06:03 AM
time stamp for file modification youngstorm Linux - Newbie 2 11-01-2005 03:46 PM
Heeelp! Preserving file modification attribute Slackovado Slackware 4 04-01-2005 02:31 AM
File Modification Date Comparison MadTurki Programming 7 03-08-2004 04:02 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration