“getfacl: Removing leading '/' from absolute path names”解决办法
[root@raclhr-11gR2-N1 ~]# getfacl -R /u01/app > /tmp/bk_lhr_perm_u01_rac1.txt getfacl: Removing leading '/' from absolute path names [root@raclhr-11gR2-N1 ~]# head -n 6 /tmp/bk_lhr_perm_u01_rac1.txt # file: u01/app # owner: root # group: oinstall user::rwx group::r-x other::r-x [root@raclhr-11gR2-N1 ~]# getfacl -pR /u01/app > /tmp/bk_lhr_perm_u01_rac1.txt [root@raclhr-11gR2-N1 ~]# [root@raclhr-11gR2-N1 ~]# head -n 6 /tmp/bk_lhr_perm_u01_rac1.txt # file: /u01/app # owner: root # group: oinstall user::rwx group::r-x other::r-x [root@raclhr-11gR2-N1 ~]#
解决:加上-p参数即可。
-p, --absolute-names Do not strip leading slash characters (`/'). The default behavior is to strip leading slash characters.
从getfacl的手册页:
-p, --absolute-names Do not strip leading slash characters (`/'). The default behavior is to strip leading slash characters.
在不使用-p开关的情况下提供绝对路径时会发出警告消息.
当给getfacl命令提供绝对路径时,输出是不同的.
没有-p开关:
$getfacl /path/foo/bar getfacl: Removing leading '/' from absolute path names# file: path/foo/bar[Output truncated...]
请注意,仅当使用-p开关时,文件路径中的前导斜杠才会显示.
$getfacl -p /path/foo/bar# file: /path/foo/bar[Output truncated...]
当您通过管道输出进行进一步处理时,-p对于保持前导斜杠非常有用.
当给getfacl命令赋予相对路径时,输出是相同的.
$getfacl bar# file: bar[Output truncated...]
没有变化:
$getfacl -p bar# file: bar[Output truncated...]
About Me
........................................................................................................................
● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除
● 本文在itpub、博客园、CSDN和个人微 信公众号( xiaomaimiaolhr)上有同步更新
● 本文itpub地址: http://blog.itpub.net/26736162
● 本文博客园地址: http://www.cnblogs.com/lhrbest
● 本文CSDN地址: https://blog.csdn.net/lihuarongaini
● 本文pdf版、个人简介及小麦苗云盘地址: http://blog.itpub.net/26736162/viewspace-1624453/
● 数据库笔试面试题库及解答: http://blog.itpub.net/26736162/viewspace-2134706/
● DBA宝典今日头条号地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826
........................................................................................................................
● QQ群号: 230161599(满) 、618766405
● 微 信群:可加我微 信,我拉大家进群,非诚勿扰
● 联系我请加QQ好友 ( 646634621 ),注明添加缘由
● 于 2019-08-01 06:00 ~ 2019-08-31 24:00 在西安完成
● 最新修改时间:2019-08-01 06:00 ~ 2019-08-31 24:00
● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解
● 版权所有,欢迎分享本文,转载请保留出处
........................................................................................................................
● 小麦苗的微店: https://weidian.com/s/793741433?wfr=c&ifr=shopdetail
● 小麦苗出版的数据库类丛书: http://blog.itpub.net/26736162/viewspace-2142121/
● 小麦苗OCP、OCM、高可用网络班: http://blog.itpub.net/26736162/viewspace-2148098/
● 小麦苗腾讯课堂主页: https://lhr.ke.qq.com/
........................................................................................................................
使用 微 信客户端扫描下面的二维码来关注小麦苗的微 信公众号( xiaomaimiaolhr)及QQ群(DBA宝典)、添加小麦苗微 信, 学习最实用的数据库技术。
........................................................................................................................

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2654233/,如需转载,请注明出处,否则将追究法律责任。