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

Convert JSON to YAML
You need to install the Catmandu Perl module via `cpanm Catmandu`

Update dyndns.org with your external IP.
This is great if you are behind a router that does not support dynamic dns updates! Example: AT&T u-verse gateway... Put this in a script and run it as a cron job.

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

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Create a new file

escape any command aliases
e.g. if rm is aliased for 'rm -i', you can escape the alias by prepending a backslash: rm [file] # WILL prompt for confirmation per the alias \rm [file] # will NOT prompt for confirmation per the default behavior of the command

Getting ESP and EIP addresses from running processes
'ps' let you specify the format that you want to see on the output.

start a vnc server session to connect to a gdm login screen

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

Check if a command is available in your system
Usefull to detect if a commad that your script relies upon is properly installed in your box, you can use it as a function function is_program_installed() { type "$1" >/dev/null } Invoke it and check the execution code is_program_installed "dialog" if [ ! $? -eq 0 ]; then echo "dialog is not installed" exit 1 fi


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: