Month: February 2013

Don’t you like Unix Shell Script …. keep on backup 10 backup file and delete the oldest when the directories got 11 backup

Hopefully useful for everyone if you write unix shell script: ### count number of files in the bcp_backup files ### Z_FILE_COUNT=$(ls /users1/aruser/bcp_backup | grep bcp_classes_dev | wc -l) echo “Numbers of Files in here: $Z_FILE_COUNT” ### if there is 10 or more files, delete the oldest one ### if [ “$Z_FILE_COUNT” -ge 10 ]; then Read More