-P 表示物理连接名,而不是link name, -- 是为了预防目录名有"-" 的情况出现,cd会执行失败
common_bin=$(cd -P -- "$(dirname -- "$this")" && pwd -P)
[root@namenode tmp]# mkdir -dirss
mkdir: invalid option -- d
Try `mkdir --help' for more information.
[root@namenode tmp]# mkdir -- -dirss
[root@namenode tmp]# cd -dirs
-bash: cd: -d: invalid option
cd: usage: cd [-L|-P] [dir]
[root@namenode tmp]# cd -- -dirss
[root@namenode -dirss]#
[root@namenode tmp]# rsync --help | grep \-a
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
[root@namenode tmp]# rsync --help | grep -- \-a
-a, --archive archive mode; same as -rlptgoD (no -H)
--append append data onto shorter files
-A, --acls preserve ACLs (implies --perms)
--delete-after receiver deletes after transfer, not before
--address=ADDRESS bind address for outgoing socket to daemon
阅读(1715) | 评论(0) | 转发(0) |