snap/htop/common/.local/lib/locale/en_IN.UTF-8 All the files present in this directory are listed without any filters Following is the output from my current working directory. This command will display all the files in your current working directory. Using the find command in its simplest form is to search for your files in your current working directory. This is the simplest demonstration for using the find command. Using the -name option allows me to search the file specified by ‘source.c’. I have asked specifically to search in the ‘/home/gaurav/workspace’ path. In this command, I am using the find command to search for a file “source.c”. find /home/gaurav/workspace -name "source.c" Let us illustrate this command with an example. Options: You can use the available options used with the find command in this space.įind_what: In this attribute, put in the name or part of the name of the file to be searched. In short, the starting directory to start the search is specified.Įxpression: You can specify the search patterns for the particular file you are searching. Search_Path: Here comes the path where we specify the path from where we wish the system to start searching for the file. Let us look at each attribute of the syntax to get an idea of the significance of each of them. I have tried to simplify the syntax of the find command to understand the command better. The general syntax for the find command is as follows. Finding the files of particular type or extension or searching by the name will be possible if you understand the general syntax of this command well. Using the find command in a proper way can make your task easier. We will also learn about the locate command which is also a faster way to search for the files by name. We will look at the different arguments that can be used with the find command. In this tutorial, we will be focusing on finding the files by name. To make this task easier, Linux offers certain commands to do this job for you.įind is a popular command used in the Linux systems that can help you search for various files based on their names, type, extension, permissions, owner, etc. Finding it conventionally may be a time-consuming task. However, sometimes it becomes a very tedious job to find an individual file in the huge pile of files on your system. Users usually try to find a file using the GUI.
0 Comments
Leave a Reply. |