问题描述
我正在解决强盗。我看了解决方法,但没有任何解释。
例如,当我使用find .
在强盗5-> 6
bandit5@bandit:~/inhere$ find . -type f -readable ! -executable -size 1033c
**./maybehere07/.file2**
bandit5@bandit:~/inhere$ cat ./maybehere07/.file2
**DXjZPULLxYr17uwoI01bNLQbtFemEgo7**
我在强盗6上使用了find .
6->我没有得到任何输出
在他们用find /
bandit6@bandit:~$ find / -user bandit7 -group bandit6 -size 33c 2>/dev/null
/var/lib/dpkg/info/bandit7.password
都是ASCII文本,所以有什么区别
解决方法
path 参数告诉find
搜索位置。如果使用.
,它将仅在当前目录的子目录中搜索,而/
表示根目录,即它将在所有位置搜索。而且,确实如您所见,/var/lib/dpkg/info/
不是~/inhere
的子目录。
如果您正在谈论linux find
命令:
find . [other expressions]
表示您要根据当前目录查找文件。
find / [other expressions]
表示您要基于根(/
)目录查找文件。