LinuxDevices.com Archive Index (1999-2012) | 2013-current at LinuxGizmos.com | About  

If you habit the command line, read this

Feb 25, 2008 — by LinuxDevices Staff — from the LinuxDevices Archive

Linux Cookbook author Michael Stutz has written an article describing 10 good habits for Unix command-line users. Published by IBM's DeveloperWorks, Stutz's article offers suggestions for improving the efficiency of some of your most common command-line procedures.

Stutz's tips address listing files, counting lines of output, fluffing up compressed archives, creating directory trees, making long commands readable on a standard console width, conditional piping, and more. Most tips will likely be old hat to LinuxDevices readers. Or will they?

For example, did you know that xargs can be used not only to flip arguments, but also, when used without an argument itself (and with the -e option in case any argument contains an end-of-file character), to put all output on a single line?

Or, did you know grep -c can count lines faster than wc -l in some cases, but not in others?

Even if you only learn one or two such nuggets, the article could save you and your Linux PC many milliseconds and milliWatts respectively over a year's use. Efficiency is a beautiful thing. This fun story can be found here.


 
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.