Articles tagged with: awk
Duplicating WordPress Installation
Whenever you upgrade your WordPress installation or do development work, it is always a good idea to be working on a copy of your main site and not on the real thing. Copying WordPress installation …
Restart Apache, MySQL When Low on Memory
Heavy traffic, hungry SQL queries, leaky applications will eventually leave your server low on memory. Apache will go on a hunt for swap space and MySQL will start freezing in thoughtful contemplation. Your hard drives …
MySQL Global Search and Replace Script
A day will eventually come when your need to find and replace a string of text in your database. You don’t know which row, or which column, or which table. Heck, you may not even …
Controlling Process CPU Utilization
Let’s say there is a process on your Unix/Linux system that sometimes tends to consume all CPU resources and become unresponsive. At the same time, you do not want to terminate the process at the …
Sharing Videos from Linux to Xbox 360
Xbox 360 uses UPnP protocol to stream multimedia files from computers on your home network. Normally, you would have a Windows PC running WMP and sharing files. But what if you have a Linux box …
Useful SysAdmin Scripts: Search-and-Replace
Let’s say you moved your server to a new network and now it has a different IP address. You know your users have a habit of hard-coding the server’s IP into their scripts. So you …
Creating print.css for WordPress
Many WordPress theme designers choose to cut some corners with their creations. One of the more important things they skip over is print.css – the stylesheet that controls your blog’s appearance when you print it. …
Passing shell variables to awk and sed
By default awk and sed do not expand shell or system variables and do not pass their own variables back to the shell. To use shell variables awk and sed statements must be included in …
Wget examples and scripts
Wget is a command-line Web browser for Unix and Windows. Wget can download Web pages and files; it can submit form data and follow links; it can mirror entire Web sites and make local copies. …
Count users with “last”
Here is a quick example showing how to count users logged in on a particular date using the “last” command on Linux.

Most Commented