Eddie On Everything

Tips & tricks on things that interest me

Entries Tagged ‘unix’

Linux .forward file not working? Make sure you have the permissions set correctly

I checked in to one of my Linux accounts today and saw that I had about 2 GB of unread emails. Dating back to 2008, these emails were almost entirely the output of different cron jobs that I have set up & running on that account.  They were error notifications & various STDOUT messages.  Nothing [...]

Caution: filename not matched error when unzipping multiple files workaround

I was unzipping a boatload of zip files today, and I casually entered “unzip *zip” into my Linux command line. No way, said my system. Instead of unzipping the files, I got a bunch of warnings that read: “caution: filename not matched,” followed by a filename.  At the end of the listing, unzip told me [...]

How to Scan a Computer for Open Ports

There are a bunch of GUI utilities for conducting port scans, but I prefer to work from a command line shell.  In the past, I’ve used a custom script for scanning a machine for open ports from the command line, but I recently needed to get a little more information from a scan than my [...]

The Zen of Taco Bell Programming – Using Unix Tools to Prevent Reinventing the Wheel

Saw this great article by Ted Dziuba that parallels my programming philosophy. ( In case you’re interested, here’s a reddit thread on the article. ) In short, the article states that much of what you want to accomplish with any project is possible with the standard, tried-and-true Unix tools. When you shun these tools in [...]

How To Keep An SSH Connection Alive in Linux

By default, many Linux configurations automatically close SSH sessions after a certain amount of inactivity. You can easily change this setting on your system by editing the sshd configuration file. Of course, before doing so, you should consider the security implications of keeping SSH sessions active. Setting your server to keep connections alive may present [...]

Rotating Backup Directories using cp -al (hardlinks) to Save Disk Space

The copy command “cp -al” found on all versions of Unix/Linux creates what’s called a “hard link” to a file. The nice thing about this command is that it doesn’t create an actual copy of the file on disk – instead, it creates a “link” or pointer to the file data on the disk. Basically [...]

“Argument list too long” from rm command. A Perl Script to Get Around the Problem

You’ve seen the problem – many Unix commands don’t like very long argument lists.  For instance, my Linux machine complains when I try to “rm” 10,000 files at once: [eddie@yoakam test]$ rm * -bash: /bin/rm: Argument list too long Here’s a simple script that will delete all of the files in a given directory, even [...]

Linux Question: When does updatedb.mlocat / cron.daily run?

Uggh. My Ubuntu server’s updatedb.mlocate process is loud as heck and runs *forever*. I haven’t noticed a performance decrease, as the job is set to run at a fairly low priority. But since I sit near the server, it’s annoying to listen to the hard drive churn for hours and hours. All I wanted to [...]


Send me a dollar