File Processing in Linux – Best tool to Search it!
File processing is essential way to find and process in the system. In this blog, we will discuss the best tool to search file processing in linux operating system. I’m sharing one of best tool exist in linux to search files in different way. You can perform to search any file in different way. The “find” command is available to search any particular file using different switches such as name, permission and etc.
What is Find Command?
Find command is available in operating system to search any file or directories with their specific information. Find command used to find file from the system database.
What is Foo?
Foo is database available in linux operating system. It contains the all information related file and directories existing in the system. By processing and searching any file in the system foo database will search and retrieve the desire information.
In addition, you can locate the foo database in linux operating system. How to implement:
# locate foo
Press Enter to proceed
After this command applied you will see look like this:
It will search all the files and directories information and store the database in the system. It is easy to locate and search the files or folder in the operating system.
How to Search Name Wise using Find Command?
If you want to search in particular file name, it is quite easy to search it.
Open Terminal and implement the below command:
For example, the file name shadow we want to search in the operating system. Simply, we used find command and then “/” is parent directory. In addition, “-name” switch used to search name wise and then mentioned the file name or directory name we want to search it.
You will see the search result as mentioned in the screenshot. You can clearly see that destination location comes in search result.
Permission-wise Searching Using Find Command?
Another instance is to find permission wise search the linux operating system. Permission exist in operating system by finding using “-perm” switch. If you do not know the permission concepts read our permission blog to understand the numeric and alphabetic permission exist in the linux operating system.
In “open terminal” login as root user and apply the below command:
# find / -perm +777
Press enter to proceed.
After that you will get information for those files that have 777 permission levels exist in the operating system.
To find user level searching using find tool?
If you want to search user level searching using find command. You can simply apply command using “-user” switch in the system. Here you can look the example:
# find –user root –group root
Press enter to proceed.
To search size wise in linux?
Another example is about to search size wise, if you want to look highly consumed files exist in the operating system. You can simply use “-size” switch with mention the size. It will retrieve the information from the database. Here you can look the example:
# find / -size +1024k
Press enter to proceed.
It will get all files detailed who want +1024kb size in the operating system. Is it great tool?
Moreover, there are lots of other switches you can use with find command in the operating system. There are few of other switches need to know you while using file command. Three types of switches are important in the operating system these are:
-atime-> To know when file was last read or access.
-mtime-> To know when file was last changed.
-ctime-> Last metadata information was changed
How to apply these switches? Still confusing? Please check the below screenshot:
Another example using the mtime applied in linux operating system:
So, this is all about file processing using find command in operating system. It is just great tool to process and search files in the system. Read our all blogs and applied the commands accordingly.
In this blog, we discusses about the file processing exist in the linux operating system. We learned the basic command implementation using find tool. Foo database is also helpful to retrieve the updated information in the system.
In the first phase we learned the search ability using find command. We learned to search first name wise, permission wise and size wise. It is good tool when you interact with the command line interface. Additionally, user or group search is also applicable. At last, we learned the atime, mtime and ctime switches using find command tool. There are also lots of switches you can use with find command. If you want to see the find switches you can simply see the manual find command. For more information related to file processing blog you can send us query. We will surely help you can to resolve your query.
No comments