bsarahim
asked on
Purge option, expect 6 latest files
In unix, can you anybody tell me, how to delete all the files in folder and except 6 latest timestamp files.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ls -t | tail -n +7 | xargs rm