History
Article Edit this page Discussion

Decrease chances of file corruption in case of computer crash

From Vim Tips Wiki

Jump to: navigation, search

Tip 1507 Previous Next Created: June 10, 2007 Complexity: intermediate Author: Yakov Lerner Version: 6.0


Bad luck happens.

On the Vim mailing list, one user complained about irrepairable file corruption that happened after OS crash and reboot. The filesystem repair utility, fsck, dutily repaired the filesystem at the expense of losing large pieces of data from his file. Yick. Recently changed files suffer most danger if OS crashes.

The following autocommand will decrease chances of file loss in case of unexpected hardware failure or unexpected electricity failure:

" disk sync after every write
au BufWritePost * silent !sync

May uninterrupted power be with you.

[edit] Comments

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto Wiki
Doctor Who
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Mystery Science Theater 3000
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Decrease chances of file corruption in case of computer crash"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation