Commands tagged video (76)

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

Verify/edit bash history command before executing it
Bash history commands are those that begin with the character ! (eg. the most popular 'sudo !!' Explained here => By default bash immediately executes the history command. Setting this shell option will make bash first allow you to verify/edit an history command before executing it. To set this option permanently, put this command in ~/.profile or ~/.bashrc file. To unset this option issue following command. $shopt -u histverify

Displays an animated hourglass for x amount of seconds

List only executables installed by a debian package
I wanted to view only executables installed by a package. This seemed to work. There's got to be easier way, please share. Note: (1) Replace iptables with the package name of your interest (2) The command will trash any existing environment variable named 'lst' (3) Instead if you are interested in viewing just .ko or .so files installed by this package, then that would be easy: $ dpkg -L iptables | grep "\.[sk]o$"

Create a video that is supported by youtube
Takes an mpeg video and coverts it to a youtube compatible flv file. The -r 25 sets the frame rate for PAL, for NTSC use 29.97

Remove last line from files recursively
Used this command recently to remove the trailing ?> from all the files in a php project, which has having some unnecessary whitespace issues. Obviously, change *.php to whatever you'd like.

a function to find the fastest free DNS server
Evoke from the command like as: $ timeDNS . This isn't too terribly practical, but it is a good code example of using subshells to run the queries in parallel and the use of an "anonymous function" (a/k/a "inline group") to group i/o. . I'm assuming you have already defined your local DNS cache as ${local_DNS}, (here, it's . You do need to install `moreutils` to get `sponge`. . If you're willing to wait, a slower version w/o sponge, (and w/o sorting), is this: . DNS () { for x in "" "" "" "" "" "" "" "" ""; do (echo -n "$x "; dig @"$x" "$*"|grep Query) ; done ; }

Convert ascii string to hex
If you're going to use od, here's how to suppress the labels at the beginning. Also, it doesn't output the \x, hence the sed command at the end. Remove it for space separated hex values instead

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"

Sum file sizes

Force the script to be started as root
Will run the script as root and exit if the wrong or no password is given. Also will keep the parameters active if any where given.

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: