Delete files in /tmp directory - Linux

Hi Team,

Want to delete files in /tmp , its almost filled with 20 gb of data . In that some files are important , so is there any command to delete files with pattern by date wise ?

NOV 27 → 100 FILES are there
NOV 25 → 1000 FILES are there

Searched over the internet but rm ls -l|grep "NOV 27" is not working , need expects help .


Try to use

Find Files extension in a particular directory

find /tftpboot/ -name "*.ima"
find /conf -name "*.pem"

Delete n days old files in directory

find /tftpboot/* -mtime +50 -exec rm {} \;
1 Like