help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs changed file's own user and file permission


From: Giorgos Keramidas
Subject: Re: emacs changed file's own user and file permission
Date: Tue, 11 Dec 2007 23:27:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (berkeley-unix)

On Mon, 10 Dec 2007 10:42:35 -0800 (PST), Xah Lee <address@hidden> wrote:
> How to stop emacs's backup changing the file's creation date of the
> original file?
>
> Put this code in your emacs init file: "(setq backup-by-copying t)"

This is sound advice, for the particular question.

> Unix-like systems (unixes and linuxes) file systems do not record file
> creation date. (this is one of the major fuckup in unixes, and is a
> fact few unix people knew, even senior unix sys admins. (I'm not sure
> what file system linuxes uses now, but is so up to 2004))

... but this is wrong.

  $ uname -a
  FreeBSD kobe 8.0-CURRENT FreeBSD 8.0-CURRENT #0: \
  Sun Dec  2 07:32:26 EET 2007     \
  address@hidden:/home/build/obj/home/build/src/sys/KOBE  i386

  $ touch .bashrc

  $ ls -lUT .bashrc
  -rw-------  1 keramida  users  - 4112 Nov 28 22:37:32 2007 .bashrc

  $ ls -lT .bashrc
  -rw-------  1 keramida  users  - 4112 Dec 11 23:25:05 2007 .bashrc

  $

Note the time displayed when the -U option is used.  It's the time my
`.bashrc' file was edited (a few minutes ago), and overwritten by vim.
Had I used Emacs with the `backup-by-copying' option, the time would be
even further back in the past.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]