• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux commands you might not know and will help you a lot

alfa147x

Lifer
Some tools that will make your work or hobby even more interesting and productive.


http://enterprise.linux.com/enterprise/06/02/17/153239.shtml?tid=129

An interactive process viewer: htop

My first tool is htop. Most Linux users, when they first wanted to find out what was eating all their CPU time, were taught about top. Top tells you what processes are running and how many resources they're using ... in just about the most unfriendly way possible.

Htop does exactly the same thing as top, but is much less likely to induce migraines. It's color-coded, which makes it easier to read. It has an easy-to-read summary of CPU, memory, and swap usage displayed as simple bars at the top of the screen. Most usefully, it has the most important keyboard commands permanently listed at the bottom of the screen for easy reference. It also displays the complete command line for running processes, not just the process name.

The nano editor

Despite having used Linux for more than four years, I still have no idea how to use vi or Emacs, because I use GNU nano.

Vi and Emacs may be able to write a novel for you and make your coffee once you learn how to use them, but nano can edit text without requiring a months-long learning process. Like htop, it displays the most important commands right on the screen so you never forget them or have to look them up, and it's the most straightforward text editor around for simply editing text.

EasyTAG

My next application is not, strictly speaking, a sysadmin tool, but I have a lot of music files sitting around on my computer. EasyTAGis a brilliant little application for managing the metadata that describes a file's song title, artist, album, and so forth -- for MP3, FLAC, Ogg Vorbis, and other digital media files. You can quickly and easily apply any given tag to any number of files, but that's just the start. EasyTAG's best features are its smart features. One simple feature is a little button that numbers tracks in a directory in order from 01 upwards. On the more complex side of things, EasyTAG can rename files based on tags, or fill in tags based on file names, through a simple, variable-based filtering module which has built-in templates that cover many common types of filenames.

Filelight

How often have you run out of disk space on a partition and wondered what was eating it all, then been frustrated while trying to come up with a console command that would tell you quickly and easily? Filelight is one of the few GUI applications that covers a sysadmin task better than a CLI command.

Filelight gives you a graphical display of your filesystem as a series of concentric segmented rings organized by disk space used. It starts off with an overview of the entire filesystem, with directories that use more space showing up as larger chunks of pie. The directory layers are arranged outwards in concentric circles. You can easily zoom in at any level by clicking, making it a few seconds' work to identify the culprit in even the largest filesystem. Baobab is a similar utility, but I find Filelight's display method lets you find large files much faster than Baobab's.

Fanout

Fanout is a simple utility that does a simple but useful thing: it connects to any number of machines via SSH and executes the same command on all of them. It's as simple as fanout "machine1 machine2 machine3" "command".

GNOME Password Manager (GPass)

GPass is not strictly a sysadmin utility, but it's an essential tool for any security-minded Internet user. If you're anything like I used to be, you have a few strong passwords you use for your user, the root account, and "important" Web sites, and one or two simple, weak passwords you use on all the other places that require passwords.

Even some "unimportant" accounts could cause you inconvenience if they were compromised, so it would be best to have strong passwords everywhere. Most people can't remember 212-character, non-dictionary passwords -- but GPass can!

GPass is a password management application that stores unlimited username and password combinations in a securely encrypted database which is protected by a single password or passphrase.

By restricting access to the database file (you can even store it on a USB key and keep it with you at all times), you can get all the security benefits of multiple strong passwords with none of the inconvenience of trying to remember them.

Out of all the many password management applications available, I like GPass because it's convenient, it can generate random passwords easily, and it has many sensible shortcuts. For instance, you can use Shift-Ctrl-i to copy the username and Shift-Ctrl-c to copy the password from any username / password pair.

Urpmi's parallel mode

Urpmi is Mandriva's package management tool, and it has all the normal features of tools like Debian's apt-get. It has its own special party trick too. Though using it is a bit more complicated than the other tools on my list, it's worth the investment.

On a master machine you can define a group of slave machines in a configuration file, and then you can use the --parallel parameter to perform any Urpmi operation on all the machines in the group. Any packages that need to be installed will not be retrieved separately on each machine, but retrieved just once on the master machine and then distributed to the slave machines prior to installation. I use urpmi --parallel to keep my three machines updated daily with the latest Mandriva development packages. It's much faster than updating each machine separately, and it saves on bandwidth by downloading the packages only once.

Adam Williamson is the editor of the Mandriva Community newsletter and the official Mandriva Club Forum Monkey, a job title he demanded as a condition of his employment.

Let us know about your most valuable utilities (there need not be 10 of them), and if we publish your work, we'll pay you $100.
 
Originally posted by: alfa147x
Some tools that will make your work or hobby even more interesting and productive.

It also displays the complete command line for running processes, not just the process name.

"c" in (at least Redhat ES3's version of top) does the same thing. With long commands (JAVA stuff seems to be a mess) this can be icky. 😉

The nano editor

I think if you learn a half dozen vi commands you should know enough to use it decently well. Sure, nano is fine, but when you need power vi and emacs are the only solutions.

Filelight

How often have you run out of disk space on a partition and wondered what was eating it all, then been frustrated while trying to come up with a console command that would tell you quickly and easily? Filelight is one of the few GUI applications that covers a sysadmin task better than a CLI command.

du -hs

Adam Williamson is the editor of the Mandriva Community newsletter and the official Mandriva Club Forum Monkey, a job title he demanded as a condition of his employment.

Let us know about your most valuable utilities (there need not be 10 of them), and if we publish your work, we'll pay you $100.

Spam? Or did you just rip off the site by posting someone else's article? 😛
 
I'm normally in favour of learning the real tools, but stuff like this is good for people that aren't otherwise interested in learning the opaque, complex stuff. Thanks for the post.

And, à propos de n0cmonkey's spam comment, I thought you had written this right until the very end too 😛
 
I belive in using tools that are most likley to be on common linux boxes. This means vi over nano and perl/python over php/ruby/etc. Its not that I dont have nano installed. I do, its for my wife. I dont have a problem with nano at all. But I would rather use vi so that when i'm at work I dont feel like a fool when I type nano -w and nothing happens.
 
Originally posted by: sourceninja
I belive in using tools that are most likley to be on common linux boxes. This means vi over nano and perl/python over php/ruby/etc. Its not that I dont have nano installed. I do, its for my wife. I dont have a problem with nano at all. But I would rather use vi so that when i'm at work I dont feel like a fool when I type nano -w and nothing happens.

That was basically the inspiration for my unix commands thread.
 
Back
Top