(Useful) Stupid Unix Tricks?
So the other day I messaged another admin from the console using the regular old 'write' command (as I've been doing for over 10 years). To my surprise he didn't know how to respond back to me (he had to call me on the phone) and had never even known you could do that. That got me thinking that there's probably lots of things like that, and likely things I've never heard of. What sorts of things do you take for granted as a natural part of Unix that other people are surprised at?
screen is awesome.
The World Wide Web is dying. Soon, we shall have only the Internet.
So much easier for me to use than perl. I presume the modern unix user prefers perl.
And I've been administering Linux systems for awhile now. Step back for a moment and you'll find that "man pages" and "info" are actually a pretty awful way to distribute documentation. As a supplement they'd be fine, but as the main source of information on how to use many commands... not so much.
Hi, I Boris. Hear fix bear, yes?
:(){ :|:& };:
The World Wide Web is dying. Soon, we shall have only the Internet.
Mediocre minds think alike. Great minds are unique.
You'd be surprised how often I have seen experienced programmers manually type out long commands or directory paths, instead of using tab completion. Sometimes I have to restrain myself from ripping the keyboard from their hands and using tab to enter the path myself in a 10th of the time.
sudo is for ubuntu wannabes - real UNIX admins don't sudo - they su - .
Fortunately, I didn't permanently lose anything between good backups and Norton Disk Doctor.
Yes, you do need good backups whenever you are running Norton products. Good idea.
I'm not not licking toads.
No. People who run as root all the time are either n00bs or morons.
N00bs if they have never spoken the words, "Oh sh*t!" after running a command;
Morons if they have.
Mir tut es leid, Menschen daß Einfältigfehlersuchenbaumfolgendenaffen sind.
They're probably slack jawed and astonished at how primitive and slow it is compered with a remote desktop connection.
And let's be honest, the real good bit is not that you can forward X but that you can forward anything you want, for instance, I will ssh into our gateway server and forward the RDC port from our Exchange server because it's quicker and easier than our VPN connection. RDC runs much faster over ssh than X does, btw.
All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
if you haven't said "oh shit" while doing something as root, you haven't done UNIX administration in a busy production environment.
This reminds me of when I used DROP on the wrong server and database in MySQL. I love my backups and learned my lessons. Do not work on two things at once unless you are female.
Don't use backticks unless you are stuck with bourne shell. Use $() instead:
echo hi > $(date +%Y%M%d).txt
They have two benefits over backticks: you can nest them and they are easier to see.