I want to find files which are greater than 1 GB and older than 6 months in entire server. How to write a command for this?
find /path -mtime +180 -size +1G
-mtime means search for modification times that are greater than 180 days (+180). And the
-size parameter searches for files greater than 1GB.
find / -size +1G -mtime +180 -type f -print
Here's the explanation of the command option by option: Starting from the root directory, it finds all files bigger than 1 Gb, modified more than 180 days ago, that are of type "file", and prints their path.