Commands tagged play (3)

  • This command, taken from play's manual page, plays a synthesized guitar tone for each of the strings on a standard tuned guitar. The command "play" is a part of the package "sox".

    for n in E2 A2 D3 G3 B3 E4;do play -n synth 4 pluck $n repeat 2;done
    eightmillion · 2009-12-13 06:57:26 6
  • I wasted two hours reading the sox documentation and searching on the web for the format of some obscure fscking sound sample, and then finally came up with this. This plays only the first three seconds of your unknown formatted sound file using every one of sox's built-in filetypes. If you don't get an exact match, you may get close. . I could not fit every single type in and keep it under 127 characters, so you will have to replace "..." with the full list obtainable by `$ sox --help` (or try `Show sample output`) . note: /usr/bin/play should be linked to sox on most systems. Show Sample Output

    for x in 8svx aif aifc aiff aiffc ... wv wve xa xi ; do echo $x ; play -q -t $x soundfile trim 0 3 ; done
    unixmonkey365 · 2011-12-09 00:23:45 3
  • useful signals are: pkill -SIGSTOP mpg321 #pause pkill -SIGCONT mpg321 #resume pkill -SIGHUP mpg321 #stop pkill -SIGKILL mpg321 #force exit TIP: use aliases or shortcuts to control mpg321 from the Desktop Manager

    pkill -{signal} mpg321
    neurignacio · 2011-11-23 12:11:02 0

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

DVD to YouTube ready watermarked MPEG-4 AVI file using mencoder (step 2)
Reencodes to MPEG-4 DivX output video file from step 1. Audio stream is simply copied. Resizes to 320x240 and deinterlaces as needed. A heading subtitle file is applied as watermark. This heading subtitle file can be a URL.

get the top 10 longest filenames

Create/open/use encrypted directory
Create/open/use an encrypted directory encfs needs to be installed During creation easiest to use default values The encrypted files will be in ~/.crypt and you will work as usual in ~/crypt To close the encrypted directory run: fusermount -u ~/crypt When you switch off the computer the encrypted directory will be automatically closed This example uses /home/user/crypt as encrypted directory I use ubuntu linux 8.04 and I am also the creator of

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

show the date every rpm was installed
the newest rpms are at the top; individual packages can also be queried this way: rpm --last -q package

Remove all zero size files from current directory (not recursive)

Throttling Bandwidth On A Mac
sudo ipfw pipe 1 config bw 50KByte/s Set the bandwidth (bw) limit to any number you want. For example you could have a 15kb pipe for X application and then a 100kb pipe for another application and attach things to those pipes. If a port isn’t attached to a pipe, it runs at full speed. Change the number (in this case 1) to a different number for a different pipe. The next step is to attach your port. sudo ipfw add 1 pipe 1 src-port 80 In this case anything on port 80 (http) will be set to a limit of 50Kbyte/s. If you want to attach a second port to this pipe, repeat the command but change the port number at the end. src :

Empty the linux buffer cache

Set laptop display brightness
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video). $ cat /proc/acpi/video/VGA/LCD/brightness to discover the possible values for your display.

Create a random password encrypted with md5 with custom lenght
This was useful to generate random passwords to some webpage users, using the sample code, inside a bash script

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: