Question : Delete old files and keep 30 latest files

how can i issue a command line in unix/linux to delete all old files and only keep the latest 30 files?

Answer : Delete old files and keep 30 latest files

oops, add a ` to the end of that command..

rm `ls -t | awk 'NR>30'`
Random Solutions  
 
programming4us programming4us