All commands (13,025)


  • 14
    wget -q -O - `youtube-dl -b -g $url`| ffmpeg -i - -f mp3 -vn -acodec libmp3lame -| mpg123 -
    torrid · 2009-11-07 13:45:13 7
  • This version of tweet() doesn't require you to put quotes around the body of your tweet... it also prompts you for password. It will still barf on a '!' character.


    7
    tweet () { curl -u UserName -d status="$*" http://twitter.com/statuses/update.xml; }
    bartonski · 2009-11-07 06:54:02 0

  • -1
    grep -c '^From ' mbox_file
    drewk · 2009-11-07 03:31:05 0

  • 6
    read -sn 1 -p 'Press any key to continue...';echo
    arcege · 2009-11-07 03:05:21 1
  • This works on some other version of read.


    -4
    echo -n "Press any key to continue..." && read
    matthewbauer · 2009-11-06 22:49:46 2
  • A shell function using perl to easily convert Unix-time to text. Put in in your ~/.bashrc or equivalent. Tested on Linux / Solaris Bourne, bash and zsh. using perl 5.6 and higher. (Does not require GNU date like some other commands) Show Sample Output


    1
    utime(){ perl -e "print localtime($1).\"\n\"";}
    MoHaG · 2009-11-06 12:58:10 0

  • -4
    wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
    sanjaygoel · 2009-11-06 10:18:26 0
  • That makes a function you can put in your ~/.bashrc to run it when you need in any term with an IP as argument Show Sample Output


    3
    GeoipLookUp(){ curl -A "Mozilla/5.0" -s "http://www.geody.com/geoip.php?ip=$1" | grep "^IP.*$1" | html2text; }
    sputnick · 2009-11-06 00:32:27 1
  • Halt script progress until a key has been pressed. Source: http://bash-hackers.org/wiki/doku.php/mirroring/bashfaq/065


    24
    read -sn 1 -p "Press any key to continue..."
    kalaxy · 2009-11-05 21:53:23 0

  • 8
    umount -a -t nfs
    sdadh01 · 2009-11-05 20:57:32 1
  • Simple MAC adrress, thanks to ifconfig.


    0
    ifconfig | awk '/HW/ {print $5}'
    Cont3mpo · 2009-11-05 18:00:50 1

  • -2
    mount | awk '/:/ { print $3 } ' | xargs sudo umount
    uid0 · 2009-11-05 17:19:11 0
  • ...or for a particular interface...


    0
    ip link show eth0 | grep "link/ether" | awk '{print $2}'
    maxmanders · 2009-11-05 17:06:15 0
  • Of course, you can adjust "Maildir" to your config... Show Sample Output


    1
    find ~/Maildir/ -mindepth 1 -type d | egrep -v '/cur$|/tmp$|/new$' | xargs
    ook · 2009-11-05 14:11:29 0
  • Alternative command to retrieve the CPU model name and strip off the "model name : " labels. Show Sample Output


    0
    sed -n 's/^model name[ \t]*: *//p' /proc/cpuinfo
    jgc · 2009-11-05 10:59:31 1
  • require the tex4ht package . You can open the file with openoffice , I use it much for correct my spelling and grammar . Show Sample Output


    2
    htlatex MyFile.tex "xhtml,ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"
    eastwind · 2009-11-05 10:12:28 1
  • Extracts the model name of the CPU and displays it on screen. Show Sample Output


    3
    grep "model name" /proc/cpuinfo
    getkaizer · 2009-11-05 05:23:30 0
  • Useful tool to test if all speaker channels are working properly. speaker-test is part of alsa-utils package Show Sample Output


    5
    speaker-test -D plug:surround51 -c 6 -l 1 -t wav
    alperyilmaz · 2009-11-05 02:57:46 0
  • For those of us that still uses lynx :)


    -5
    lynx --dump http://ip.boa.nu|sed -e 's/^[[:space:]]*//' -e 's/*[[:space:]]$//'|grep -v ^$
    xeor · 2009-11-04 22:23:45 0
  • Using our beloved wget


    -6
    wget -O - -q ip.boa.nu
    xeor · 2009-11-04 22:22:04 0

  • -3
    curl whatismyip.org
    m8t · 2009-11-04 21:40:31 0
  • I much prefer using /sbin/ip over /sbin/ifconfig for most everything. I find the interface and output to be much more consistent and it has many abilities that ifconfig, route, etc. do not. To get the mac address for only one interface, add 'show dev [interface]' to the 'ip link' part of the command: ip link show dev eth0 | grep 'link/ether' | awk '{print $2}' . Also, both this command and the ifconfig one do not require root access to run, so the sudo is not necessary. Show Sample Output


    1
    ip link | grep 'link/ether' | awk '{print $2}'
    markdrago · 2009-11-04 19:41:26 1

  • -2
    sudo ifconfig -a | grep eth | grep HW | cut -d' ' -f11
    rubenmoran · 2009-11-04 19:24:35 0
  • Adds up the total memory used by all Stainless processes: 1 Stainless, 1 StainlessManager and 1 StainlessClient per tab open. Show Sample Output


    0
    ps -ec -o command,rss | grep Stainless | awk -F ' ' '{ x = x + $2 } END { print x/(1024) " MB."}'
    unixmonkey6893 · 2009-11-04 19:01:22 0
  • This command uses the top voted "Get your external IP" command from commandlinefu.com to get your external IP address. Use this and you will always be using the communities favourite command. This is a tongue-in-cheek entry and not recommended for actual usage.


    -1
    eval $(curl -s http://www.commandlinefu.com/commands/matching/external/ZXh0ZXJuYWw=/sort-by-votes/plaintext|sed -n '/^# Get your external IP address$/{n;p;q}')
    jgc · 2009-11-04 16:58:31 0
  • ‹ First  < 383 384 385 386 387 >  Last ›

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



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: