Commands by soupmagnet (0)

  • bash: commands not found

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

watch the previous command
If you just executed some long command, like "ps -aefww | grep -i [m]yProcess", and if you don't want to retype it or cycle backwards in history and waste time quoting it, then you can use history substitution.

Sync the existing directory structure to destination, without transferring any files

Save xkcd to a pdf with captions
Saves to a PDF with title and alt text of comic. As asked for on http://bbs.archlinux.org/viewtopic.php?id=91100 Change xkcd.com to dynamic.xkcd.com/comics/random for a random comic.

Google URL shortener
Use curl and sed to shorten an URL using goo.gl without any other api

grep tab (\t)
works in bash

Stop or Start (Restart) a Windows service from a Linux machine
Control (stop, start, restart) a Windows Service from a Linux machine which has the `net` command (provided by samba).

git remove files which have been deleted
I've used technicalpickles command a lot, but this one handles whitespaces in filenames. I'm sure you want to create an alias for it :)

Cap apt-get download speed
apt-get is pretty aggressive when it downloads, potentially hogging the bandwidth of your network. The 25 is in KB, change this to your needs.

return external ip
Get your ip address, hostname, ASN and geolocation information. If you want just one field as a text response you can also get that,eg curl ipinfo.io/ip

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


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: