分页: 1 / 1

nano.save文件是什么东西,是怎么产生的?

发表于 : 2013-04-18 20:54
haoaina521
如题。。。麻烦大牛解答下

Re: nano.save文件是什么东西,是怎么产生的?

发表于 : 2013-04-18 22:32
mraandtux
nano编辑器的文件。

Re: nano.save文件是什么东西,是怎么产生的?

发表于 : 2013-04-19 0:56
haoaina521
mraandtux 写了:nano编辑器的文件。
咦,我都没有安装过这个编辑器,好像也没用过,这个编辑器有什么用?那这些文件可不可以删除???

Re: nano.save文件是什么东西,是怎么产生的?

发表于 : 2013-04-19 9:05
mraandtux
haoaina521 写了:
mraandtux 写了:nano编辑器的文件。
咦,我都没有安装过这个编辑器,好像也没用过,这个编辑器有什么用?那这些文件可不可以删除???
nano编辑器只能在终端使用,nano.save文件可以删除,nano这个软件包也可以删除。

Re: nano.save文件是什么东西,是怎么产生的?

发表于 : 2013-04-19 10:31
haoaina521
mraandtux 写了:
haoaina521 写了:
mraandtux 写了:nano编辑器的文件。
咦,我都没有安装过这个编辑器,好像也没用过,这个编辑器有什么用?那这些文件可不可以删除???
nano编辑器只能在终端使用,nano.save文件可以删除,nano这个软件包也可以删除。
额,我的意思是可以用nano编辑器来干嘛,我好像都没用过,然后就产生了这些文件。

Re: nano.save文件是什么东西,是怎么产生的?

发表于 : 2013-04-19 10:39
mraandtux
haoaina521 写了:
mraandtux 写了:
haoaina521 写了:
mraandtux 写了:nano编辑器的文件。
咦,我都没有安装过这个编辑器,好像也没用过,这个编辑器有什么用?那这些文件可不可以删除???
nano编辑器只能在终端使用,nano.save文件可以删除,nano这个软件包也可以删除。
额,我的意思是可以用nano编辑器来干嘛,我好像都没用过,然后就产生了这么文件。
nano就当gedit一样。

Re: nano.save文件是什么东西,是怎么产生的?

发表于 : 2013-04-19 12:31
YeLee
nano will try to dump the buffer into an emergency file in some cases. Mainly, this will happen if nano receives a SIGHUP or SIGTERM or runs out of memory, when it will write the buffer into a file named nano.save if the buffer didn't have a name already, or will add a ".save" suffix to the current filename. If an emergency file with that name already exists in the current directory, ".save" and a number (e.g. ".save.1") will be suffixed to the current filename in order to make it unique. In multibuffer mode, nano will write all the open buffers to the respective emergency files.
:em01 :em01 :em01

Re: nano.save文件是什么东西,是怎么产生的?

发表于 : 2013-04-19 13:44
haoaina521
YeLee 写了:
nano will try to dump the buffer into an emergency file in some cases. Mainly, this will happen if nano receives a SIGHUP or SIGTERM or runs out of memory, when it will write the buffer into a file named nano.save if the buffer didn't have a name already, or will add a ".save" suffix to the current filename. If an emergency file with that name already exists in the current directory, ".save" and a number (e.g. ".save.1") will be suffixed to the current filename in order to make it unique. In multibuffer mode, nano will write all the open buffers to the respective emergency files.
:em01 :em01 :em01
大概的意思是nano会在紧急的情况将buffer写入到nano.save文件中,比如nano收到一个sighup,sigterm或者内存溢出?sighup,sigterm是什么来着?但是我并有没有启用nano,或者是说什么情况下某个程序将nano当成默认编辑器使用了?

Re: nano.save文件是什么东西,是怎么产生的?

发表于 : 2013-04-19 15:32
YeLee
例如visudo之类的东西,会调用默认编辑器。 :em01 :em01 :em01

Re: nano.save文件是什么东西,是怎么产生的?

发表于 : 2013-04-19 18:47
haoaina521
YeLee 写了:例如visudo之类的东西,会调用默认编辑器。 :em01 :em01 :em01
但是我的默认编辑器是vim啊