Looking For A File In Linux? Here Are Some Commands That Come In Handy

linux file system

linux file systemIf you are familiar with Linux, finding a file can be a breeze. But for the not so familiar Linux user, it may be quite challenging to find a file you are searching for. The Linux operating system is known to have features that protect the computer. However, this is only for the new user and over time one can easily master those features. Here are some commands that will come in handy when you want to open files and cannot seem to find them.
-depth: This is a command that is mainly used in processing contents in a directory before the directory itself.
-name: If you are looking for files that begin with a specific set of characters, then this is the command that is most appropriate. For instance, if you are looking for files that are saved as best leave in conditioners then this is the best command to use. Learn more about best leave in conditioners for curly hair here.
-user: When using this command you can you can specify the username of that person who owns the file.
-atime n: You can use this command if you can remember the last time you accessed the file you want to open.
-mount: This is a search limited command to the directory that has been specified. It never goes beyond the specified directories.
-nogroup: This is a command used in searching for files that do not belong to any group.
The locate command
This command is mainly used in listing files in a database. It can also be used with several arguments.
-d path or –database=path: Rather than looking for files in a default database. It searches for them in the database paths that have been listed together with this parameter. If there are unlike database file names, they can be specified with this command by isolating them with a “:” sign.
-e or –existing: With this command, you can isolate to identify just those file names that were in existence during the creation of the database. It does not identify those files that can be found in the database but those that are no longer in existence.
-I or –ignore: This argument is mainly used to assume case sensitivity since if not assumed all the searches will be case sensitive.
–help: The command is used in showing the syntax.
The whereis command
This is the command used for searching for various types of files. With the use of arguments that are different, you can be able to specify if the file you are looking for is source, binary, etc.
-b: This argument is usually specified to indicate that one only wants to search for binary files.
-M: This argument can be used in limiting the areas to be searched by the command for sections that are manual.
-S: This argument can help you in mentioning the specific areas to look for a file.
The whichis command
This is one of the simplest commands which are mainly used in searching for other types of commands. That is, those files that have been stored as commands. The syntax which helps in locating the file you are searching for.
Well, we cannot exhaust all the commands that can help you locate a file on a Linux, but we sure have given you the best and easy to use commands especially if you are new on Linux.