Linux Find Commands Cheat sheet.
Lets assume we are currently under our /home directory.
Find Files Using Name and Ignoring Case ( Ignore upper & lower case )
Find Files under any specified Directory.
Find Files Using Name and Ignoring Case ( Ignore upper & lower case )
Find files based on extention ( .php .txt .csv .sh )
Find Directories
Find files with 777 Permission
Find files without 755 Permission
Find all files Based on User
We will find all files placed within /home directory having ownership of user jackuna
Find all files based on specific Group
We will find all files placed within /home directory having group of user sysadmins
Find specific file type for a user
We will find all files with .txt extension for user jackuna under /home directory
Find all empty files ( no content )
We will find all empty/blank files under /tmp directory.
Find all empty directories ( no content )
We will find all empty/blank directories under /tmp directory.
Find all hidden files
We will find all hidden files under /tmp directory.
Find and remove a single file
We will find file named as myfile.txt under /home directory and remove it permanently
Find and remove a multi[ple file
We will find all files with .sh and .mp3 extension under /home and delete it permanently
Find files that are older then n number of days
Below find command will find all files that are older then 20 days under /tmp directory
Find files that are accessed then n number of days before
Below find command will find all files that are accessed 20 days before under /tmp directory
Find files that are changed within last hour
Below find command will find all files that are changed within last 60 min under /tmp directory
Below find command will find all files that are modified within last 60 min under /tmp directory
Find accessed files in last 60 minutes
Below find command will find all files that are accessed within last 60 min under /tmp directory