prune (shear) command

Well, I successfully managed to get the one line command I wrote to successfully delete all security camera entries older than 100 days.  The directory had grown to about 300GB, encompassing 14 months, so it was time to weed things out a bit.

The command I wrote into an executable file in my personal path was:  find $1 -mtime +100 -exec rm -R {} \;

I saved it in my path and called it prune.  The syntax it was to expect was:  prune <directory to prune with trailing />  I was then to remove all files and directories older than 100 days.

However, it didn’t work.  I scratched my head for awhile, discovered it worked if I manually typed in the find string.  Sometimes I can be such a dumb ass.  I didn’t realize that there already was a prune command in /usr/bin/ for some kind of graphing functions.  So, I renamed MY prune command to shear, and everything works as expected.

Oh, the 300GB of security camera video was reduced to 60GB.  My next step will be to put it in a cron, so that it’s automatic….  Too  bad that I’ll never get that 45 minutes back, LOL.