Commands by mary1998 (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

Resets your MAC to a random MAC address to make you harder to find.
Next time you are leaching off of someone else's wifi use this command before you start your bittorrent ...for legitimate files only of course. It creates a hexidecimal string using md5sum from the first few lines of /dev/urandom and splices it into the proper MAC address format. Then it changes your MAC and resets your wireless (wlan0:0).

cooking a list of numbers for calculation
When you've got a list of numbers each on its row, the ECHO command puts them on a simple line, separated by space. You can then substitute the spaces with an operator. Finally, pipe it to the BC program.

Search shoutcast web radio by keyword
Searches for web radio by submitted keyword and returns the station name and the link for listing . May be enhanced to read user's selection and submit it to mplayer.

Convert a single-page PDF to a hi-res PNG, at 300dpi
If you skip this part: $ -density 300x300 you'll get a very lo-res image.

Url Encode
Converts reserved characters in a URI to their percent encoded counterparts. Alternate python version: $ echo "$url" | python -c 'import sys,urllib;print urllib.quote(sys.stdin.read().strip())'

Create backup copy of file, adding suffix of the date of the file modification (NOT today's date)
If your `date` command has `-r` option, you don't need `stat`

Are the two lines anagrams?
This works by reading in two lines of input, turning each into a list of one-character matches that are sorted and compared.

Beep siren
Infinitely plays beeps with sinusoidally changing sound frequency. Ideal for alarm on an event.

Extract IPv4 addressess from file

how many pages will my text files print on?
This gives a very rough estimate of how many pages your text files will print on. Assumes 60 lines per page, and does not take long lines into account.


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: