Sinisa wrote:Here's one solution:>
> I am trying to make a script that would run every couple hours and purge all
> files in certain folder except last five files (most recent).
> Files are being added to that folder constantly.
> Can you help me ?
n=5 # save $n most recent
set -- `/bin/ls -t`
if test $# -gt $n
/bin/rm -f "$"
Roger Cornelius [email]racpoptenzing.org[/email]