Detailed explanation of TCL script which runs periodically and removes old versions of website to free some disk space.
Say you have a web developers team, and staging system, your testers are building test versions of your websites and that eats your HDD's free space, but in fact you don't need old versions of website, so to free some disk space you can remove old versions. You can do that manually, but if you are reading this probably you've decided to automate that process. Now I am going to show the TCL script that helps me do that. In my situation there are many websites sitting in the /data/www directory, but few of them starting with "dev" string are not website directories so I need to skip them. What I need to do with websites it to keep last n versions and some folders and remove the older versions. Here is the output of ls -al command for example.com website.
TCL (Tool Command Language) is a scripting language developed for scientific and engineering applications. It is implemented in the command interpreter program "wish" along with the TK (Tool Kit) graphical interface. TK provides a collection of commands so that a script application can use graphical interface items such as buttons and menus. There are many extensions that can be combined with TCL/TK. One such extension is the BLT toolkit, which provides commands for creating X/Y graphs and barcharts.
Website - http://www.ciscoarmenia.com/articles/...
Playlist - • Cisco Packet Tracer Networking Tutorials
Linkedin / 815
Facebook - https://www.facebook.com/groups/netac...