printtaya.blogg.se

Find file on linux
Find file on linux









find file on linux

Through –user and –group option find can also search files of the owner and group ownerships based. # find / -iname ‘*passWD*’ (4) Files by user ( -user option) and ( -group option ) You want to ignore case in searching through find command like yo do not know the case, it could be lowercase, uppercase or any of them, you can run find command with –iname option.Syntax will be like below.This is called as case insensitive searching through find command. #find /etc –name '*passwd*' (3) Files for case –insensitive ( -iname option) if we need to search any file which contain passwd anywhere in the etc directory and all sub directory, we will execute below command. Here is the –name option took after with file name will fetch exact matches given file name. # find /home –type d ( For Directory ) # find /bin –type l ( For soft Link files) # find /dev –type b ( For Block device files ) # find /home –type f ( For Regular files ) (2) Files by Name ( -name option) The –type option followed by given file type like regular file, directory, soft link file and block devices files. Options : This argument will use to customize our output as we needed.Įxpression : This attribute is search for a file name and return on all results that are match.īelow are 7 different method to searching in Linux file system : (1) Files by Type ( -type option) Search_Path : This is the path where find will filter the files or expression General Syntax of find command is below and it usage is below in uses methods. To search files user must have read and execute permission on a directory to inspect its contents.įind command have a large number of options that uses depend on type of file should be found. The Find command is best tool to perform a real time search in the linux file system to find the files.

find file on linux find file on linux

In this post, here we are going to discuss find command that can search files and directories in the linux based system.











Find file on linux