19 August 2008

My 2 New Commands for the Week

Don't you just love learning random new commands? I learned two commands in the last week, which is pretty good, because after your first couple months, the rate of learning new commands kind of slows down. Anyway, here are the two commands I learned:

  1. tr - This is the translate tool. You give it two sets and an input file. It then substitutes one set for the other throughout the input file. For example, if I wanted to generate a dictionary of words typed using Qwerty-muscle-memory on Dvorak keyboards, I'd use this command. Just make sure the sets are in the order you want them to be. You can also use ranges, so if you wanted to do a Caesar Cypher, you could use [A-Za-z] and [D-ZA-Cd-za-c] as your sets.
  2. faillog - If you're ever wondering if someone's been trying to guess your password, take a look at faillog. It gives you a nice little chat of failed login attempts. It also lets you set maximum failed attempts before locking the account and the timeout length.

Who else learned a new command this week?


12 comments:

Odd-rationale said...

I learned a new command this week that I was rather excited about: sudo !! (sudo bang bang).

Have you ever typed a command like "apt-get update" or some really complicated command but forgot the sudo? No problem! Just type "sudo !!" and it will repeat the previous command with the sudo!!!

Pretty cool.

Mackenzie said...

Ah yeah, I learned that one a while ago, and I use it all the time. One I always forget that I wish I could remember is "cd ~-" which moves to the previous directory.

noarmsjames said...

I also learned sudo !!

Great help that command is

Beau said...

I've learned all about rsync this week! Now I'm a backing up madman!

And scp isn't that bad either.

And mpg123 is pretty slick for playing an audio file as an alert program.

It's been quite a week.

I gotta work on logging next week.

Raphaƫl said...

I learned 'sl' this week. It makes a nice animated train when you mistype 'ls'.

SEJeff said...

Mackenzie,

You might take a look at these free linux classes (sponsored by the shuttleworth foundation):
http://learnlinux.tsf.org.za/

If you aren't that familar with Linux systems administration, these will

SEJeff said...

Oh almost forgot. Here is a nifty command for you:
tload

It displays a sidescrolling ascii graph of your system load. Pretty cool

Mackenzie said...

Jeff, that seems oddly like advertising, but as it's a SABDFL thing and free/gratis I'll let it alone.

And I'm familiar with Linux just fine, so that may be better aimed at readers. This blog's been up for a year and a half, and my current internship is as a SysAdmin/SysEng.

John Reese said...

Just use `cd -` rather than `cd ~-`...

Robb said...

If you are going through alot of directories, you can use "pushd" and "popd", instead of "cd -". These commands use a stack to keep a history of the directories you visited. (Use "pushd" to go to a new directory, and "popd" to return to the previous directory).

Mackenzie said...

A directory stack? That is way too sweet.

cannedguds said...
This comment has been removed by a blog administrator.