in reply to Writing to a file atomically without renaming
I ran a test on my system and it overwrites the contents without affecting the owner or permissions... although I don't know if that redirection is guaranteed to be atomicm but you could make a third copy of the original, just in case, and remove it when everything is successfully completed.copy file_to_modify temp_file # modify file cat temp_file > file_to_modify
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Writing to a file atomically without renaming
by waswas-fng (Curate) on Jun 30, 2005 at 20:30 UTC | |
by Transient (Hermit) on Jun 30, 2005 at 20:40 UTC | |
by salva (Canon) on Jun 30, 2005 at 20:47 UTC | |
by waswas-fng (Curate) on Jun 30, 2005 at 22:38 UTC | |
by Transient (Hermit) on Jun 30, 2005 at 23:16 UTC | |
by waswas-fng (Curate) on Jun 30, 2005 at 23:22 UTC | |
|