Find Command
Find is the utility used in linux systems to find the files on the linux env easily in no time , The basic commands for find command is as follows :
Find files in the current directoy with name :
find . -type f -name <filename>
Find files in full filesystem or disk :
find / -type f -name <filename>
3 . Searching directory in the current path :
find . -type d -name <folder_name>
-------------OR------------
find / -type d -name <folder name>
Searching files or directory owned by user of group
find . -type f -user <useername> -group <group> -name <file OR folder name>
Filtering the results & errors from the find output
find . -type f -user root -group root -name file.txt 2>/dev/null
Find the files based on the permissions given on it :
find / -type f -name file.txt -user root -group root -perm 444 2>/dev/null
Last updated