Search form

Bash

Ubuntu dpkg Error

If you run a recent vintage of Ubuntu, you may encounter the following dpkg error when you're trying to update or install packages. This is usually caused by Ubuntu simultaneously running another instance of the package manager, often on system startup. Still, it can be annoying when you're trying to update your system.

Stop xmlrpc.php Attacks

Summary: how to diagnose and eliminate the xmlrpc.php WordPress exploit when it's clobbering your web server.

You've been running a public Ubuntu 12+ and Apache/LAMP web server for a while now. Until recently everything has worked fine, but suddenly your server is struggling to display even static pages. Sometimes content takes forever to load, and occasionally pages fail to load at all, with Apache showing the 503/Service Unavailable error. You haven't made any recent changes to your applications, server software, or databases, so what's going on?

Bash: Make a Web Site Index

An old Bash script that uses awk to construct an index with hyperlinks from the .html files in a web tree. Attempts to use the <title> tag to name each link.

To use, change your directories in the 'for dir' line to the directories you want to scan, then run the script: ./myscript.sh > myfile.html.

sed and awk

sed and awk are two powerful but often overlooked data processing tools, and if you know how to use them effectively you'll be well ahead of many sysadmins and developers.

grep

grep is a useful utility that finds fixed strings or patterns of text in a given file or standard input. Used in conjunction with error logs or debugger output, grep can help a programmer identify errors in an application code base or filesystem; to help with this, grep understands regular expressions, what it calls "extended" regular expressions, Perl-style regular expressions, and POSIX definitions.

Fedora 20 Installation Woes

Attempting to install Fedora 20 on an older i7 system recently produced a series of failures. For starters, after the installation allegedly completed, the system would hang after the BIOS screens at the point where the OS should start. That's because Anaconda installed no bootloader. A computer isn't very useful with no operating system.

To fix this problem, boot off the Fedora 20 live CD, select "Rescue a Fedora Installation" and install grub2:

Subscribe to RSS - Bash