What Is the Difference Between ''Find.'' and ''Find /'' on Linux Command [Closed]
I Am Solving Overthewire Bandit. I Looked Solutions but There Is No Explanation About It. for Example When I Use Find. Find It on Bandit 5->6 Bandit5@Bandit...
I am solving overthewire bandit. I looked solutions but there is no explanation about it.
For example when i use find . find it on bandit 5->6
bandit5@bandit:~/inhere$ find . -type f -readable ! -executable -size 1033c
**./maybehere07/.file2**
bandit5@bandit:~/inhere$ cat ./maybehere07/.file2
**DXjZPULLxYr17uwoI01bNLQbtFemEgo7**
I used find . on bandit6->7 i didn't get any output
in the solution they solved with find /
bandit6@bandit:~$ find / -user bandit7 -group bandit6 -size 33c 2>/dev/null
/var/lib/dpkg/info/bandit7.password
both of are ASCII Text so what is the difference
If you are talking about the linux find command:
find . [other expressions] means you want to find files based on your current directory.
While find / [other expressions] means you want to find files based on the root (/) directory.
The path parameter tells find where to search. If you use ., it will only search in the subdirectories of the current directory, while / means the root directory, i.e. it will search everywhere. And, indeed, as you can see, /var/lib/dpkg/info/ is not a subdirectory of ~/inhere.