LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

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

Rep: Reputation: 0
file modification in linux


Hi

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
GlowGlow
Member
 
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
nov
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
JunctaJuvant
Member
 
Registered: May 2003
Location: Wageningen, the Netherlands
Distribution: OS X
Posts: 488

Rep: Reputation: 31
Quote:
... 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:
Quote:
... a working knowledge of C, and an understanding of the general principles of operating system design.
Hope that helps.
 
  


Reply


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 12 01-19-2013 09:37 AM
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


All times are GMT -5. The time now is 12:49 PM.

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