top | item 2041318

25 Even More Slick Linux Commands

70 points| yarapavan | 15 years ago |viewtext.org | reply

17 comments

order
[+] AdamGibbins|15 years ago|reply
I really wish these blogs would stop replacing " with “ and ' with ’.

I know it looks nicer, but it totally breaks the ability to paste into a shell :(

[+] jazzychad|15 years ago|reply
This is a result of WordPress's "texturize" function, which is buried deep within the main core of WP. It changes all the 'normal' punctuation marks with their 'prettier' alternatives, and it has always driven me insane.

Funny story: I had the good fortune to drive Matt Mullenweg to dinner after a WordCamp, and in the car we talked about many things. We got to the topic of typography, which made me lament the fact that I was always frustrated when all these blogs would replace straight quotes with curly quotes and how hard it was to copy/paste them elsewhere. "Oh, yeah," he said. "I wrote that."

At that point I completely forgot who I was escorting, shot Matt a sideways glare and said, "YOOOUUUUUU!!!!!!!"

I was immediately embarrassed, but he took it in stride :)

[+] ndunn2|15 years ago|reply
#2 can be replaced with a 'tree' command

#3 doesn't work for me on Mac OSX with Bash; the ! is interpreted as the last command. Not sure if this works in other shells

#4 is clever, but I would think if you're doing something that complex that you need to recall time and time again you'd make an alias for it.

#8 is clever. I love AWK. But not sure when I'd ever use this.

The rest were pretty bleh to me. Always looking for new shell kung fu but unfortunately this list did nothing for me.

[+] kthxbye|15 years ago|reply
You need to turn on extended globbing for #3 (shopt -s extglob).
[+] japaget|15 years ago|reply
The list stops partway through the 18th command on Firefox 3.6.13, IE 8, Safari 5.03, Google Chrome 8.0, or Opera 11.00. Use the "Original Link" in yarapavan's comment below to see the rest.
[+] steve-howard|15 years ago|reply
Seems that there's a <title> in the original text where the text stops. Apparently the HTML wasn't escaped on that line.
[+] jrockway|15 years ago|reply
I use this alias:

    alias http="plackup -MPlack::App::Directory -e 'Plack::App::Directory->new({ root => \$ENV{PWD} })->to_app;'"
Which starts a webserver that serves the current directory over HTTP. You can even pass args like --port 8080 to set the port.

(I most recently used this to git clone some library I wrote while at work. They recently blocked github, so I ssh'd to my home machine from my phone, cd ~/projects, http, and then did "git clone http://snowball2.jrock.us:5000/whatever/.git whatever". Not quite as convenient as github, but better than being stuck with the buggy version at work :)

[+] euccastro|15 years ago|reply
Also:

  python -m SimpleHTTPServer
or

  python -m SimpleHTTPServer 8000
[+] nitrogen|15 years ago|reply
The password generator can be tweaked slightly to return the first --n-- sequences of --m-- or more alphanumeric characters:

  strings /dev/urandom | grep -o '[[:alnum:]]\{--m--\}' | head -n --n--