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

Remove security limitations from PDF documents using ghostscript (for Windows)
#4345 also works under windows

Watch active calls on an Asterisk PBX
Show active calls as the happen on an Asterisk server. Note that the Asterisk command (in single quotes) is formatted for Asterisk 1.6. Use the -n flag on the watch command to modify the refresh period (in seconds - default is 2 seconds).

Synthesize text as speech
The Festival Speech Synthesis System converts text into sound. Or: links -dump http://youfavoritewebsite.com | festival --tts

check open ports without netstat or lsof

Search for a string inside all files in the current directory
ack seeks for , list all found files and display everything in nice colors. Look for it in http://betterthangrep.com/

Get the canonical, absolute path given a relative and/or noncanonical path
readlink -f accepts a relative, noncanonical path and emits the corresponding canonical, absolute path.

move a lot of files over ssh
Useful to move many files (thousands or millions files) over ssh. Faster than scp because this way you save a lot of tcp connection establishments (syn/ack packets). If using a fast lan (I have just tested gigabyte ethernet) it is faster to not compress the data so the command would be: tar -cf - /home/user/test | ssh user@sshServer 'cd /tmp; tar xf -'

Google text-to-speech in mp3 format
same but redirecting to player and putting whaever text line.. works on my ubuntu machine ...

MSDOS command to check existance of command and exit batch if failed
This is a command to be used inside of MS-DOS batch files to check existence of commands as preconditions before actual batch processing can be started. If the command is found, batch script continues execution. If not, a message is printed on screen, script then waits for user pressing a key and exits. An error message of the command itself is suppressed for clarity purpose.

Get rid from a blank display without reboot
Killall5 will kill your session and redirect to login screen. -Very useful when suffering display problems. -Can use F1-F6 -Need to login in the particular console if not already


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: