What does * do in Linux?

No. In your example, the command used is not find, it is file. The file command is used to determine the file type. find is used to search.

In your example, the full command is file ./-* but there is more relevant info in the previous commands.

First, the ls command is used to list all files and directories. The user found a directory called inhere so they used the cd command to change directories, or move into it. The user then listed all the files/directories in that directory with ls again.

Now he sees some files but he doesn't know what they are so he uses the file command to see info about the files. The confusing part for you is the ./-* so lets break these down. ./ is used to tell an executable to run. So lets say you write a Python script and use chmod +x my_script.py command to make it an executable. You would then use ./my_script.py to run it or execute it.

Now if we look higher up in your example picture, when all the files are listed out they each start with a -. What the command file ./-* is saying is "display the info about each file in this directory that starts with -." To be honest, the ./ is unnecessary because file -* does the same thing.

/r/HowToHack Thread Parent