Commands tagged ipv6 (7)

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

split large video file
i have a large video file, 500+ MB, so i cant upload it to flickr, so to reduce the size i split it into 2 files. the command shows the splitting for the first file, from 0-4 minutes. ss is start time and t is duration (how long you want the output file to be). credit goes to philc: NOTE: when i made the second half of the video, i got a *lot* of lines like this: frame= 0 fps= 0 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbit just be patient, it is working =)

Read a keypress without echoing it
This shell snippet reads a single keypress from stdin and stores it in the $KEY variable. You do NOT have to press the enter key! The key is NOT echoed to stdout! This is useful for implementing simple text menus in scripts and similar things.

Get current Xorg resolution via xrandr

a trash function for bash
Every rm'ed a file you needed? Of course you haven't. But I have. I got sick of it so I created a bash function. Here it is. It'll put trashed files into a $HOME/.Trash/"date" folder according to the date. I have rm aliased to it as well in my bashrc so that I still use the rm command. It'll choke if you attempt to trash a directory if that directory name is already in the Trash. This rarely happens in my case but it's easy enough to add another test and to mv the old dir if necessary. function trash(){ if [ -z "$*" ] ; then echo "Usage: trash filename" else DATE=$( date +%F ) [ -d "${HOME}/.Trash/${DATE}" ] || mkdir -p ${HOME}/.Trash/${DATE} for FILE in [email protected] ; do mv "${FILE}" "${HOME}/.Trash/${DATE}" echo "${FILE} trashed!" done fi }

get all Google ipv4 subnets for a iptables firewall for example
a bit shorter, parenthesis not needed but added for clarity

Spoof your wireless MAC address on OS X to 00:e2:e3:e4:e5:e6
If you want to check that the spoof worked, type the same command as earlier: $ifconfig en1 | grep ether Now you will see: $ether 00:e2:e3:e4:e5:e6 For the wired ethernet port: $sudo ifconfig en0 ether 00:e2:e3:e4:e5:e6

Find out when your billion-second anniversary is (was). (on OS X)
This is the same command as this one, but for OS X.

Convert multiple files using avidemux
Using avidemux to convert multiple files that are in the folder where the command was executed.

stringContains: Determining if a String Contains a Substring in Bash

check open ports without netstat or lsof

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: