Commands by mrwill (7)

  • this command will beep like an alarm for one minute from 18:57. you can change "1857" to your desired time. you should have alsa-oss package installed, and you should also be root or part of "audio" group.


    -1
    while true; do while [ `date +%H%M` == "1857" ] ; do sleep 1s; yes | head -n 2000 > /dev/dsp; done; done;
    mrwill · 2011-04-23 14:44:26 8

  • 0
    equery belongs $( which mv )
    mrwill · 2011-02-11 22:50:15 3

  • -3
    rename .txt .md *.txt
    mrwill · 2010-12-19 20:04:37 6
  • you should have the "most" package installed. I like it because it is colorful and easier to read. alternatively you can use "less" instead of "most". you can also add this to your ~/.bashrc to make it permanent.


    1
    export MANPAGER='most'
    mrwill · 2010-07-02 08:35:36 7

  • 0
    ifconfig eth0 | awk '/inet / {print $2}' | cut -d ':' -f2
    mrwill · 2010-06-30 08:52:01 3
  • if you want to see all information about a package use: rpm -qi pkgname full list of querytags can be accessed by the command: rpm --querytags you can also customize the query format how ever you like with using more querytags together along with escape sequences in "man printf"! you can also use more than one package name. for example this command shows name and version in to columns: rpm -q --queryformat %-30{NAME}%{VERSION}\\n pkg1 pkg2 Show Sample Output


    2
    rpm -q --queryformat %{VERSION}\\n pkgname
    mrwill · 2010-06-03 01:54:17 5
  • you can also pipe it to "tail" command to show 10 most memory using processes. Show Sample Output


    13
    ps aux --sort=%mem,%cpu
    mrwill · 2009-10-10 22:48:51 7

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

Remote control for Rhythmbox on an Ubuntu Media PC
Note: you'll want to set up pub-key ssh auth. Gives you a quick means of changing volume/tracks/etc for rhythmbox on a remote machine. E.g.: rc --next # Play next track rc --print-playing # Grab the name rc --volume-down rc --help

ls -hog --> a more compact ls -l
I often deal with long file names and the 'ls -l' command leaves very little room for file names. An alternative is to use the -h -o and -g flags (or together, -hog). * The -h flag produces human-readable file size (e.g. 91K instead of 92728) * The -o suppresses the owner column * The -g suppresses the group column Since I use to alias ll='ls -l', I now do alias ll='ls -hog'

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

Get AWS temporary credentials ready to export based on a MFA virtual appliance
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token. This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use: `awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'` You must adapt the command line to include: * $MFA_IDis ARN of the virtual MFA or serial number of the physical one * TTL for the credentials

rename all images in folder with prefix of date and time from exif data
imagemagick is required

Generate password

Count number of files in a directory

Create a bunch of dummy text files

Show top committers for SVN repositority for today

create an uncompressed tar file of each child directory of the current working directory
First, use find to find directories exactly one level below current directory, then create a tar file using the directory as the basename.


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: