Skip to main content

Lifehacker Top 10: Top 10 Command Line Tools

Popularity Report

Total Popularity Score: 0

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Rank

Related Lists

Bookmark History

Saved by 31 people (-8 private), first by anonymouse user on 2008-07-30


Public Sticky notes

ps -eo user,pcpu,pid,cmd | sort -r -k2 | head -6

Highlighted by tibitts

9. Force an action with sudo !! ("bang bang")

sudo_bang_bang.jpg You already know that prefixing a command with sudo makes your system execute it with superuser privileges. But when you forget to sudo, the !! or "bang bang" comes to the rescue. When you've perfectly crafted a long command that does exactly what you need, hit Enter, and d'oh—you don't have sufficient access privileges—you can sudo !! to repeat the last command with superuser privileges. It's the ultimate nerd triumph: "Oh, you didn't like that command? Well, then sudo !!"

Highlighted by avidogsm

Here's my current favorite linux command, which shows you the top 5 processes using the most CPU time:

ps -eo user,pcpu,pid,cmd | sort -r -k2 | head -6

Highlighted by alfredwesterveld