CentOS下如何避免文件覆盖?

电脑入门知识大全 电脑知识 171

[root@stu227 he]# touch he.txt

[root@stu227 he]# set -o noclobber

[root@stu227 he]# echo "123" > he.txt

bash: he.txt: cannot overwrite existing file

相关影片资源迅雷下载推荐

CentOS如何设置在同一窗口打开文件夹?

如果要取消限制,就把set -o 改为set +o

[root@stu227 he]# set +o noclobber

[root@stu227 he]# echo "123" > he.txt

[root@stu227 he]# cat he.txt

123


相关影片资源迅雷下载推荐

Centos如何设置不同网段的互通?Centos设置不同网段的互通的方法

抱歉,评论功能暂时关闭!