Useful Find Commands

Find Files by name:

find /path -name filename
find /tmp /home . $HOME -name

Find Files Larger than 1Gb

find /path -type f -size +1048576

Find with wildcard:

find / -name file\*name

Find and process

find / -type f -mtime -3 | xargs tar -rf archieve.tar

[should not use -c option here, r option appends files to an archive. Since there are many files found ]

find / -name temp | xargs /bin/rm -f<br></br>
find / -name temp -exec /bin/rm -f '{}' \;```

**Find by modified time:**  
`find / -mmin -30` [find files modified 30 min ago ]

**Find by Permission:**

`find / -perm -o=w `

** Find hidden files:**  
`find / -xdev ! -type d -name \.\* | sort `

**Find Empty Files:**

`find / -empty`

**Find and Move files to a folder**

`find / <search condition> -exec mv '{}' destination \;<br></br>`