[Ghost@QuietM test]$ find . -path "tt" -prune
[Ghost@QuietM test]$ find . -path "tt" -prune -print
[Ghost@QuietM test]$ find . -path "tt" -prune -o -print
.
./ss
./q
./q/cc.txt
./qq
./ssss
./link
./sa.love
./tt
./tt/ss
./tt/cc.txt
./tt/sa.love
./tt/sa
./sa
为什么只有加了-o才会输出。。
[Ghost@QuietM test]$ find . -path "tt" -prune -print
[Ghost@QuietM test]$ find . -path "tt" -prune -o -print
.
./ss
./q
./q/cc.txt
./ssss
./link
./sa.love
./tt
./tt/ss
./tt/cc.txt
./tt/sa.love
./tt/sa
./sa
为什么只有加了-o才会输出。。
0
[Ghost@QuietM test]$ find . -path "/home/Ghost/P/test/tt" -prune -o -print . ./ss ./q ./q/cc.txt ./qq ./ssss ./link ./sa.love ./tt ./tt/ss ./tt/cc.txt ./tt/sa.love ./tt/sa ./sa
0
[Ghost@QuietM test]$ pwd
/home/Ghost/P/test
[Ghost@QuietM test]$ find . -path "/home/Ghost/P/test/tt" -prune -o -print.
./ss
./q
./q/cc.txt
./qq
./ssss
./link
./sa.love
./tt
./tt/ss
./tt/cc.txt
./tt/sa.love
./tt/sa
./sa
[Ghost@QuietM test]$ find . -path "./tt" -prune -o -print
.
./ss
./q
./q/cc.txt
./qq
./ssss
./link
./sa.love
./sa
绝对路径为什么没用。。。
/home/Ghost/P/test
[Ghost@QuietM test]$ find . -path "/home/Ghost/P/test/tt" -prune -o -print.
./ss
./q
./q/cc.txt
./ssss
./link
./sa.love
./tt
./tt/ss
./tt/cc.txt
./tt/sa.love
./tt/sa
./sa
[Ghost@QuietM test]$ find . -path "./tt" -prune -o -print
.
./ss
./q
./q/cc.txt
./ssss
./link
./sa.love
./sa
绝对路径为什么没用。。。
编辑回复