/etc/exclude.rootvg中附件中的两种表示有什么区别

大侠好!      如图所示在/etc/exclude.rootvg中附件中的两种表示有什么区别,请指教~谢谢!
参与12

10同行回答

CJ_aneCJ_ane系统运维工程师IBM
-e             Excludes files listed in the /etc/exclude.rootvg file from being backed up.              The rules for exclusion follow the pattern matching rules of the gr...显示全部
 -e
            Excludes files listed in the /etc/exclude.rootvg file from being backed up.
             The rules for exclusion follow the pattern matching rules of the grep command.

            If you want to exclude certain files from the backup, create the /etc/exclude.rootvg file, with an ASCII editor, and enter the patterns of file names that you do not want
            included in your system backup image. The patterns in this file are input to the pattern matching conventions of the grep command to determine which files will be excluded from
            the backup. If you want to exclude files listed in the /etc/exclude.rootvg file, select the Exclude Files field and press the Tab key once to change the default value to yes.

            For example:
              1    To exclude all the contents of the directory called scratch, edit the exclude file to read as follows:

                        /scratch/
              2    To exclude the contents of the directory called /tmp, and avoid excluding any other directories that have /tmp in the path name, edit the exclude file to read as follows:

                        ^./tmp/
            All files are backed up relative to . (current working directory). To exclude any file or directory for which it is important to have the search match the string at the
            beginning of the line, use the ^ (caret character) as the first character in the search string, followed by . (dot character), followed by the filename or directory to be
            excluded.
我的理解是加“^.”的话是只排除/directory/单个目录下的文件 但不包含目录
不加"^."的话是排除所有路径包含/directory/的文件和目录收起
IT其它 · 2015-03-11
浏览3229
abit2007abit2007系统工程师代维
回复 5# wlcg99999 ./tmp是表示你在敲smit mksysb目录时的目录下有个tmp目录过虑掉,/tmp就3楼兄弟CJ_ane所说的一样了。显示全部
回复 5# wlcg99999

./tmp是表示你在敲smit mksysb目录时的目录下有个tmp目录过虑掉,
/tmp就3楼兄弟CJ_ane所说的一样了。收起
互联网服务 · 2015-04-03
浏览3076
doozadooza系统工程师dooza
mksysb是以实际的/作为当前工作目录.的,所以所有要备份的文件和目录都是以./为开头,^./tmp就是实际的/tmp,而^/tmp永远不会被匹配。但/tmp可以被匹配,比如/app/tmp显示全部
mksysb是以实际的/作为当前工作目录.的,所以所有要备份的文件和目录都是以./为开头,^./tmp就是实际的/tmp,而^/tmp永远不会被匹配。但/tmp可以被匹配,比如/app/tmp收起
互联网服务 · 2015-03-18
浏览3106
wlcg99999wlcg99999系统架构师IBM
回复 7# niu2340 我问的是这个./tmp 和/tmp有什么区别(在/etc/exclude.rootvg中)显示全部
回复 7# niu2340

我问的是这个./tmp 和/tmp有什么区别(在/etc/exclude.rootvg中)收起
银行 · 2015-03-18
浏览3184
CJ_aneCJ_ane系统运维工程师IBM
回复 5# wlcg99999 这个我就不知道了..显示全部
回复 5# wlcg99999
这个我就不知道了..收起
IT其它 · 2015-03-18
浏览3032
niu2340niu2340课题专家组系统工程师江苏省农村信用社联合社
^在正则表达式中表示行首,所以能理解了吧显示全部
^在正则表达式中表示行首,所以能理解了吧收起
银行 · 2015-03-18
浏览3106
wlcg99999wlcg99999系统架构师IBM
不能沉,顶起~显示全部
不能沉,顶起~收起
银行 · 2015-03-17
浏览3068
wlcg99999wlcg99999系统架构师IBM
非常感谢CJ_ane,但是我给的目录前面有点,例如./tmp 和/tmp有什么区别(在/etc/exclude.rootvg中)显示全部
非常感谢CJ_ane,但是我给的目录前面有点,例如./tmp 和/tmp有什么区别(在/etc/exclude.rootvg中)收起
银行 · 2015-03-11
浏览3200
CJ_aneCJ_ane系统运维工程师IBM
回复 3# CJ_ane 重新看了一遍,之前的理解有点问题,应该是这样的/directory/ 是排除所有包含"direcotry"的目录,以及目录下的文件,举个例子:1./direcotry/xxxx/xxx/xx 会被排除2./xxxx/xxxx/directory/xx 会被排除^./directory 是排除"/direcotry/"目录下的所有文件(use the...显示全部
回复 3# CJ_ane

重新看了一遍,之前的理解有点问题,应该是这样的

/directory/ 是排除所有包含"direcotry"的目录,以及目录下的文件,举个例子:
1./direcotry/xxxx/xxx/xx 会被排除
2./xxxx/xxxx/directory/xx 会被排除

^./directory 是排除"/direcotry/"目录下的所有文件(use the ^ (caret character) as the first character in the search string)
1./direcotry/xxx/xxx/xxx 会被排除
2./xxx/direcotry/xxx/xxx 不会被排除收起
IT其它 · 2015-03-11
浏览3432
kanter2008kanter2008系统工程师上海***
用第一个就对了。固体为啥。忘记了。:lol显示全部
用第一个就对了。固体为啥。忘记了。:lol收起
互联网服务 · 2015-03-11
浏览3031

提问者

wlcg99999
系统架构师IBM

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2015-03-10
  • 关注会员:1 人
  • 问题浏览:8259
  • 最近回答:2015-04-03
  • X社区推广