Commands tagged alsa (13)

What's this? 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

count files by type
displays a list of all file extensions in current directory and how many files there are of each type of extension in ascending order (case insensitive)

disable caps lock
a quick one-line way to disable caps lock while running X.

scp a good script from host A which has no public access to host C, but with a hop by host B
middlehost allows ssh access from where you are but not securehost. Use nice ssh piping to simulate scp through A => B => C setting up the shell function if left as an exercise for the reader. ;-) Agent forwarding should avoid password typing.

Convert a script to one-liner
Opposite: Convert an one-liner to script: $ foo() { ; } ... $ typeset -f foo ... $ unset -f foo

Watch active calls on an Asterisk PBX
This handles when you have a single call or channel. Other commands will strip out the result if there is a single channel or call active because the output changes the noun to be singular instead of plural.

add the result of a command into vi
':r!ls -l' results in listing the files in the current directory and paste it into vi

list files recursively by size

loop over a set of items that contain spaces
If you want to operate on a set of items in Bash, and at least one of them contains spaces, the `for` loop isn't going to work the way you might expect. For example, if the current dir has two files, named "file" and "file 2", this would loop 3 times (once each for "file", "file", and "2"): $ for ITEM in `ls`; do echo "$ITEM"; done Instead, use a while loop with `read`: $ ls | while read ITEM; do echo "$ITEM"; done

Show battery infomations for OS X 10.5.x

shell function which allows you to tag files by creating symbolic links directories in a 'tags' folder.
shell function which allows you to tag files by creating symbolic links directories in a 'tags' folder. The tag function takes a tag name as its first argument, then a list of files which take that tag. The directory $HOME/tags/tagname will then hold symbolic links to each of the tagged files. This function was modified from bartonski's ( inspired by tmsu (found at with readlink function by flxndn ( Example: $ tag dog airedale.txt .shizturc This will create $HOME/tags/dog which contains symbolic links to airedale.txt .shizturc and

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.


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: