Back to the main page of this blog The Podcast Network Website
Want to host your own show on TPN?

Command Line Porn :: Paladin’s Post

It used to be something for those with excess nose hair, sandals and woollen cardigans. Tucked away in some obscure corner they huddled behind oversized monitors, rattling away at keyboards beneath matrix-printed banners reading “Klaatu barada nikto”. As Alien as the words above them was their own version of the English language, marinated in a sauce of anagrams and abbreviations. By the wayside of their worn down keyboards one would fine a sparkling new, barely untouched mouse whose only purpose was to collect dust. These guys only mentioned grep, pipes, vi and other inexplicable terms. Alien to graphic interfaces and user friendly programs like Word, Powerpoint and for all intents and purposes.. Notepad.

When I first got into Linux, I had a beef with these guyz. Lets face it . These where nerds-to-the-core. Guyz who hung around Usenet newsgroups baffling newbies with their knowledge, drowning them in over-information and giving beginners a learning curve steeper then a Swiss Ski slope. I was cross with them for making learning Linux so hard, but most of all for dissing down everything that had to do with a graphical interface. If you did not do it in the command line, it was not worth the bother. For me that was pretty baffling : According to them everything centred around the command line, and the mouse was the Devil’s own spawn. Somehow right-clicking to copy a file was lame and asking for a graphical front end for an application was a mortal sin. It looked like they wanted to keep Linux this nerd-only club that you just could not get into.

Over the last years it has all changed. Thank God for Gnome and KDE, graphical user interfaces that opened up Linux to the masses and turning it from an obscure Unix-like mainframe-babble into Steve Ballmers next sweaty nightmare. With the dawning of RPM, .Deb packages, Apt-Get installation methods and of course the CNR store , installation of software has become a breeze and even the most novice user will be able to do everything he wants to with his system without ever seeing the light of the command line.

With OSX the back end power of Linux met the simplicity of the Coopertinan designers for the first time. For most users this Linux backend is most present in the fact that there are almost no viruses and that the system is rock – solid. But .. there is more . A few months ago I opened up Spotlight and typed TERMINAL. The Unix like command prompt stared back at me and before I knew I was hooked on .. “Command Line Porn” [You just had to use something with "porn" in it didn't you... - Ed].

Instead of using the Graphic User Interface as additional eye candy for the command line core, the terminal became the extension of the former. The reason for this was a simple request: How could I automatically backup my files from my Firewire Hard drive to another firewire hard drive. Plenty of graphical tools where available. Carbon Copy for one. But to have it do what I wanted I was looking at the pay version. Solution two was building a work flow with the fantastic “automator” utility to copy the needed files from drive A to drive B. But also wanting the backup to be incremental and if possible give me a display of the output… Hmm… That was a little bit to much to ask. The script borked on me for no reason.

What if I could do it all with just one single line of code. Some “Googling” gave me the answer: A simple command line tool called Rsync ( a standard Linux command ) and the creative combination of some of its parameters gave me a rock solid solution to copying my files. And it was as fast and reliable as Dolly Parton on a water bed. Wicked! Some more Googling showed me I could schedule all of these commands in a great utility called crontab. A sort of text file that you can tell what to do at what time. The simple combination of parameters gave me infinite possibilites that would have been far to complex to figure out in a graphical user interface. And it ate no memory whatsoever.

So the terminal window kinda became an extension for my graphic user interface. Its not for everyday use, but at some level, it becomes strangely addictive. Using the “Verbose” mode you can see the output of your command scrolling by and THAT is really cool A matrix-like black and green terminal window of course adds to the atmosphere. Perhaps its not something you can use for copying just one or two files. And you surely right click a file and choose add to zip instead of using gzip -cfz /source/dir/file.gz /source/dir/filename and what have you. But if for example you want to script archiving an entire directory into a zip file at a certain time and giving you the output in a log file afterwards, there are not many graphical tools that do it so easily. Wether its on Linux, on your Mac, or even at the DOS prompt of your Windows machine. There are a lot of powerful command line commands out there that, when used creatively, can give you bigger slice of the productivity cake and help you get things done faster. So that you have more time to waste here on the GGP Blog afterwards.

Check this out, it suits Knightwise’s post perfectly. I found it this week in my travels.

Please Checkout the story behind this picture on loconet. Nice work!

Subscribe to TPN :: The Global Geek Podcast by Email

Leave a Reply

Check Spelling
Activate Spell Check while Typing