Date: Sun, 22 Aug 2010 15:14:58 +0100 From: Bruce Cran <bruce@cran.org.uk> To: Roland Smith <rsmith@xs4all.nl> Cc: EforeZZ <eforezz@gmail.com>, freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: How to restore a text file from UFS?? Message-ID: <20100822151458.000044c9@unknown> In-Reply-To: <20100819201700.GC33689@slackbox.erewhon.net> References: <AANLkTi=vNyd=4sM=EgYpqzzBv-CQA=SuZRhu6YzxvCX5@mail.gmail.com> <20100819201700.GC33689@slackbox.erewhon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 19 Aug 2010 22:17:00 +0200 Roland Smith <rsmith@xs4all.nl> wrote: > For future reference; you should never edit files in /etc/ directly. > If you want ot edit files in /etc or /usr/local/etc, first copy them > to a directory in your $HOME, put them under revision control and > then edit them and copy the edited files to /etc. That way you always > have a backup and you can even restore previous versions. I've > documented the procedure I use on my webpage; > http://www.xs4all.nl/~rsmith/unix/configfiles.html This failure, where files are truncated to 0 bytes after an unclean shutdown isn't the same way ext4 was truncating files when using editors which overwrite files in-place (as opposed to writing to a temporary file then renaming) is it? Does calling fsync on FreeBSD not ensure that even with SoftUpdates the data is on the disk before the editor has exited? -- Bruce Cran
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100822151458.000044c9>