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

Find duplicate UID in /etc/passwd
You can use only awk

analyze traffic remotely over ssh w/ wireshark
When using tcpdump, specify -U option to prevent buffering.

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

Show all available cows
There are lots of different cow options to use, this script will show them all

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.

hanukkah colored bash prompt
blue and yellow colored bash prompt for a Hanukkah celebration on your box

Change attributes of files so you can edit them
I had problems in Ubuntu while trying to edit /etc/resolv.conf, even with sudo I couldn't make any change. After a 2 minutes search on google I found this command. Hope someone finds it useful. It works like chmod, with + and - to denote which attributes are being added and which are being removed. See other attributes on man pages or on wikipedia http://en.wikipedia.org/wiki/Chattr

MP3 player
I tried a few curses based mp3 players for playing back choir practice songs for my wife. Unfortunately none of the ones I tried were capable of scrubbing a track. Firefox saves the day.

GIT: list unpushed commits

sum numbers in the file (or stdin)
add integers from the stdin and print out the result usually, cat /tmp/file | echo $(($(tr '\n' '+')0))


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: