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

Re: crontab -e - не работает



On Wed, Jul 30, 2003 at 03:21:10PM +0400, Andrey Nekrasov wrote:
>  вот такая странность, на Woody:
> $ crontab -e
> (запускается vim, я в нем редактирую и записываю нужное :wq)
> 
> crontab: no changes made to crontab
> 
> изменений нет!

Может быть, в этом дело:
:help backupcopy

'backupcopy' 'bkc'	string	(Vi default for Unix: "yes", otherwise: "auto")
			global
			{not in Vi}
	When writing a file and a backup is made, this option tells how it's
	done:
	"yes"	make a copy of the file and overwrite the original one
	"no"	rename the file and write a new one
	"auto"	one of the previous, what works best

	Making a copy and overwriting the original file:
	- Takes extra time to copy the file.
	+ When the file has special attributes, is a (hard/symbolic) link or
	  has a resource fork, all this is preserved.
	- When the file is a link the backup will have the name of the link,
	  not of the real file.

	Renaming the file and writing a new one:
	+ It's fast.
	- Sometimes not all attributes of the file can be copied to the new
	  file.
	- When the file is a link the new file will not be a link.

	The "auto" value is the middle way: When Vim sees that renaming file
	is possible without side effects (the attributes can be passed on and
	and the file is not a link) that is used.  When problems are expected,
	a copy will be made.

	One situation where "no" and "auto" will cause problems: A program
	that opens a file, invokes Vim to edit that file, and then tests if
	the open file was changed (through the file descriptor) will check the
	backup file instead of the newly created file.  "crontab -e" is an
	example.


-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517



Reply to: