All commands (14,187)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

Trick find -exec option to execute alias
An alias cannot be executed as command in a find -exec line. This form will trick the command line and let you do the job.

Disco lights in the terminal
Looks best in an 80x24 256-color terminal emulator.

command! -nargs=1 Vs vs <args>
Because entering ':' requires that you press shift, sometimes common command-line / mini-buffer commands will be capitalized by accident.

check open ports without netstat or lsof

while using lxde and being blinded by your laptop screen, you can type:
I'm not sure what apt this is, but it seems to work on most X screens, an is useful for saving power, and not straining your eyes

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Find biggest 10 files in current and subdirectories and sort by file size

list block devices
Shows all block devices in a tree with descruptions of what they are.

Create a new file

Display Spinner while waiting for some process to finish
alternatively, run the spinner for 5 seconds: timeout 5 bash -c 'spinner=( Ooooo oOooo ooOoo oooOo ooooO oooOo ooOoo oOooo); while true; do for i in ${spinner[@]}; do for j in seq 0 ${#i}; do echo -en "\b\b"; done; echo -ne "${i}"; sleep 0.2; done; done'


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: