I'm trying to remove the oldest file (whenever there's 14 or more):
I keep getting the following error though:
FILECOUNT=`ls | wc -l`;
if [ $FILECOUNT > 14 ]
cd "$PATH" && ls -tr | head -n 1 | xargx rm -f;
echo "Removed oldest file ...";
echo "No 14 files in the filesystem yet, nothing to remove";
Can anyone tell me what I'm doing wrong here ?
./mysqlbackup: line 1: ls: command not found
./mysqlbackup: line 1: wc: command not found
No 14 files in the filesystem yet, nothing to remove
Thnx in advance !