Command-line gems: tree

611 days ago
Directory structures can be hard to get your head around. Because humans are hard-wired to think graphically, the tree command was created. As its name suggests, this lists the directory tree in graphical form.

Click here to read more


Command-line gems: figlet

616 days ago

In the beginning there was ASCII. OK, that’s not true. I’m sure somebody’s going to email pointing out what came before ASCII. But let’s just pretend that’s the case for the sake of simplicity, eh?

It’s amazing what can be done with letters and symbols. It goes way beyond simply displaying text. As a college student, hacking away at a VAX terminal in the early 90s, I (and many others) spent hours chuckling at the likes of cows.

“ASCII art”, as it became known, didn’t go away. It was just deprecated (Wikipedia has a good article). But it’s still available under Linux, even if you might have to rummage through your package repository to find it. And one of the most entertainingly useless ASCII art tools is figlet.


Click here to read more


Command-line gems: dd

625 days ago

Recently I decided to join the 21st century and buy a new hard disk for my office computer. I ended-up getting a 120GB Western Digital SATA model, which repalces my eons-old 60GB Maxtor IDE model.

I didn’t fancy reinstalling my OSes again so decided to clone the older disk onto the new one. Here, as always, Linux came to my rescue, this time with the dd command.


Click here to read more


Command-line gems: smbclient

639 days ago

Utilizing file shares on Windows workstations can be a mystifying experience. Computers can appear and disappear from the network, without any good reason. This can be avoided by correctly configuring network resources but many smaller networks, of just a handful of workstations, lack such luxuries. This is especially true if they rely on workstation-based shares rather than a centralized server.

There are a number of ways for a Linux client to deal with this kind of environment. Perhaps the best way is to create a SMB (Windows) mount that specifies an IP address, instead of a NetBIOS machine name. But for quick and dirty probing and usage of SMB shares, the smbclient application can be used.


Click here to read more


Command-line gems: cdrecord

640 days ago

Most Linux distros are made available as a series of ISO files. To become useful these must be burned to CD and then booted from, or the ISO files must mounted in some way, perhaps as part of a virtual machine setup.

Most Linux desktop environments offer the ability to burn a CD image straight from the desktop. Under GNOME you can right-click and select Write to Disk, for example. This is nifty but I prefer to write CDs straight from the command-line, using the cdrecord command.


Click here to read more


Command-line gems: aspell

653 days ago
I have a couple of gems for you today which are useful if you find yourself creating text documents at the command prompt.

Click here to read more


Command-line gems: hdparm

665 days ago

Both Microsoft and Apple put a lot of work into optimizing their operating systems. Sadly, not all Linux distros make the same effort, although the situation is slowly getting better.

If you find that your system is a little sluggish, hdparm is definitely worth investigating. This is the hard-disk tweaing tool of choice under Linux. It works from the command-line and offers full control over all hard disk settings.


Click here to read more


Command-line gems: whois

667 days ago
Just a quickie command-line gem this time around, but one that’s extremely useful if you’re involved in building internet-facing servers.

Click here to read more


Command-line gems: cal & ncal

674 days ago

A few weeks ago I blogged about the potential to live your life at the command-prompt. Forget about graphical niceties; it’s just you, a dollar prompt and a blank screen.

If you’ve decided to make the switch then you might be interested in cal and ncal, two utilities that display month or year calendars.


Click here to read more


Command-line gems: screen

676 days ago

Whenever you open any kind of command-line prompt to enter commands and run programs, anything you start will last only as long as the session is kept running. When you quit the session, any task running within it ends too. This is because the shell is seen as the “owner� of the process, and when the owner is quit, any processes it started is also quit.

For example, if you open a GNOME Terminal window, start a download with wget, and then quit the Terminal Window, the wget download will end too. This is annoying if you’re sometimes over-eager to clean up the desktop and quit terminal windows, like me!

If you access your computer across a remote session, perhaps via SSH, and want to run a program that will take a long time to complete, this can become seriously annoying. You have to stay logged in until the program has completed.

But getting around this is easy.


Click here to read more
Comment [13]


Command-line gems: pdftotext

680 days ago

Say what you like about PDF files but they’re here to stay. A visit to virtually any government site will prove this. Want a tax form? Want to renew your driving license? You’ll be downloading a PDF file. They’ve become the lingua franca, if you like, of document transfer.

From an open source perspective PDF has good and bad points. It’s good in that it’s an open standard that’s freely implementable, but bad because it remains a proprietary format under the control of Adobe.

What’s little realized among Linux users is the sheer quantity of PDF tools available at the command line. Need to convert a PDF to HTML, text or postscript file? It’s easy when you know how.


Click here to read more


Command-line gems: shred

686 days ago

It’s 10pm. You’re in a dingy hotel room in Moscow. You’re transmitting files from a floppy disk that your double-agent contact gave you. Beep. Transmission complete. The CIA thanks you for using its data interface. Have a nice day!

You hear a commotion outside: Vehicles, dogs, soldiers. Carefully, you peer out of the window and see half of the Russian army on the street below. A soldier looks up lazily, catches your eye, and shouts something in Russian. Drat! They must have locked in on the signal!

You’ve got to destroy the data on the floppy disk before they get to you. You have to destroy the evidence. But how?


Click here to read more


Command-line gems: alsamixer

690 days ago

One of the joys of running Linux is discovering the thousands of programs that are installed for our convenience but that we never use, usually because we don’t know about them.

So here’s the first installment of my new series: Command-line gems. Over the coming days and weeks I’ll pick out a handful of command-line programs that are useful or simply entertaining. Most of them come installed by default on most modern Linuxes.


Click here to read more