here's a simplified Unix way.
$ export LASTFILE=`ls -t | head -n 1` $ for MYFILE in `ls | grep -Ev $LASTFILE` ; do mv $MYFILE newdir; done
In reply to Re: Unix - Keep the last modified file in the directory and move/copy the rest of the files.
by Anonymous Monk
in thread Unix - Keep the last modified file in the directory and move/copy the rest of the files.
by hyliau
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |