Tag Archives: Scripting

CentOS and RHEL 7 have Python 2.7 available in the standard packages. You can install Python 3.6 from source while keeping the current 2.7 install on your machine, so any existing dependencies will not break. You can now run python3.6 Continue reading →

Although in Linux you can easily create multi-part zip files, unzipping them can be problematic. By using the -s argument in the zip command you can specify the split size and create split archives. The following example creates split archives Continue reading →

When you need to schedule a Unix or Linux job in crontab to run on the first Sunday of the month, or any other weekday for that matter, your first instinct may be to write your cron entry to look Continue reading →

Your DD-WRT enabled router can be configured to block ads as described in the Ad Blocking article. For non-Micro DD-WRT versions the ad blocking hosts file on the router can be updated automatically by a custom shell script that you Continue reading →

Through Windows’ WMI Service you can find out who the owner is of a file. This is somewhat similar to the user/group owner of a file in UNIX or Linux, as shown in the example below, where the file myfile.txt Continue reading →

If you need to automatically start/stop Tomcat each time you start/stop/reboot your Linux server, you can do so by creating a start/stop script under the /etc/init.d directory. The sample script below is called /etc/init.d/tomcat and runs Tomcat as a user Continue reading →

If you need to convert a DOS text file to a UNIX text file, and the dos2unix command is not available on your platform, you can achieve the same result by using the tr command to remove the carriage return Continue reading →

With UNIX scripts you can do many powerful things. You won’t be able to take over the world with it, but it’s pretty close. Scripts can be useful to automate a set of tasks or to perform some more complicated Continue reading →