Finding And Processing File In Unix

file processing - Finding And Processing File In Unix


Linux operating system use files to represent the details of user and system info. Locate is a command that is used to find the file by their file name. It is a lighting past command because there is a background process that runs on our system to the existing file from the system database. We use -i case to ignore the case of a file name.


Locate -option file name


locate -i abc↵

NOTE:- We can also use the wildcard with the file name.


Find is one of the powerful utility of Unix (or Linux) used for searching the files in a directory hierarchy.


find [pathnames] [conditions]

Find And Logical Operation:

find and process file in unix
image source:-https://www.tecmint.com

Linux system provides the different logical operator to find the files from database related operations.

1. -not:

This operator identifies those content which is available in existing location.

2. -O:

It process to search the contents in multiple locations.


find name anna -o name Kanna

find name anna -not name Kanna

Find & Permission:

The file can find on the base of file permission. We use -perm option to search the file with permission and permission define with numeric form.


find -perm 777↵

Find & Numeric:

Find can search your system for files that comply with certain numeric criteria such as the size of the file(-size), the number of links to the file(-links) the date of the last change to the file’s data, (-mtime), date of the last change to the file’s metadata(-ctime) or the date of the last time the file was read(-atime).

Find & Access Time:

Find can match by inode timestamps. Such as

-atime when the file was last read.

-mtime when file data last changed.

-ctime when file data or metadata last changed.

Executing Command With Find:

Using the -exec or -ok options with find to execute a command once for each file that matches the given criteria. This is commonly used for things like removing files or renaming files that have a certain extension.

Gnome Search Tool:

Linux operating system provides us a method to manage the finding process with graphical tools. It means it provides buttons text board, liable etc to define the content with searching.

About the author

Tutorial Circle


Click here to post a comment

  • I see you don’t monetize your page, don’t waste your
    traffic, you can earn additional bucks every month because you’ve got
    hi quality content. If you want to know how to make extra money, search for:
    Boorfe’s tips best adsense alternative