linux下用vi为什么无法在/tmp目录下保存备份文件?
大家讲道理
大家讲道理 2017-04-17 13:34:48
0
2
390

vi在使用:set backup的时候,家目录下可以保存~结尾的备份文件,在tmp目录下则不行?

#touch /root/1.txt
#vi /root/1.txt

// vi打开文件后,设置backup
:set backup

// 进入插入模式,输入一些内容

// wq保存退出
:wq

// 能找到~结尾的备份文件
#ls /root/

以上的同样过程,在/tmp目录下却无法生成~结尾的备份文件,为什么?
是/tmp这个目录很特殊吗,还是vi或vim把备份文件的保存目录排除掉/tmp目录的?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
迷茫

Look at :set backupskip, the /tmp directory is ignored.

PHPzhong

Insufficient user rights


I don’t understand why I answered the wrong question?

  1. touch in /root Is this the so-called home directory?

  2. At least under ubuntu sudo vim can be saved to the /root folder

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!