![]() Also, there is the same name file in the “var” directory of Ubuntu’s file system. There is another file with the “new.sh.swp” name in our directories. On running the “locate” command with the “-n” option of value 5, we have got 5 search records for the file “new.sh”. It shows that the file is located within the Trash folder as well. When we have used this instruction with the updated total number “3” for the option “-n” to display the search result for the file “new.sh”, it returns the total of 3 records on our shell screen. This path will be the closest to your home directory or root folder, i.e. It returns the single record for the file path of this file. While at the home directory, we ran this instruction with the “n” option and value 1 to display a single record for the search result of file “new.sh”. You need to mention the number in this command to display the specified number of file records. Here is the “-n” option of “locate” instruction to display the number of records for a specific file on your terminal screen as per the user’s choice. It returns a total of 5 files with this name. Let’s take a look at its first option, “-c,” upon using it within the instruction along with the name of a file “new.sh”. The “-c” option of “locate” instruction is specifically designed to get the total count number for the specific file in the system. Let’s start with the most basic instruction, “locate”, to find the file by name from our system. It might be possible that the same name file can be located at other locations. We will be listing all the contents of a current working directory using the “ls” instruction on our Ubuntu’s terminal shell. Let’s say you have a bash file currently stored in the home working directory of Ubuntu 20.04. We will discuss simple commands to do a bah file search. What about searching those files via the terminal shell using some commands? If you don’t have any idea about bash searching, this article is for your great help. The file system is the main thing in any operating system because it holds all your data within the files and folders in different formats. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |