linux: remove files older than a certain number of days
want the command to remove files (on linux) that are older than a certain number of days? shazam! here you go:
the below command will:
remove files (note the rm in the command)
located in the current directory (note the ./ in the command)
that are older than 30 days (note the +30 in the command)
here’s another example, the below command will:
remove files (note the rm in the command)
located in any directory in /home whose name starts with oracle (note the /home/oracle* in the command)
that are older than 5 days (note the +5 in the command)