GNU Screen is an application used to split a single terminal session into several processes, seeing any number of them at the same time. Like Vim, it has a bit of a learning curve, so here’s a crash course on how to control screen, focusing on what I’ve found are the most commonly used features: […]
Have you ever passed several parameters to a command like this: ls -lah, and thought “I wish my bash scripts could parse command line parameters like that.” Allow me to introduce you to a bash function named getopts. Reader, meet getopts; getopts, meet reader.
I was working on a server this morning and accidentally deleted an important configuration file. Like many Linux users, I lamented the absence of an “undelete” command. The file wasn’t still open by any processes, wasn’t present in the backups, and would be painful to recreate. Fortunately, not all hope was lost. When a file […]