commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
That will capture 200 seconds of video at fullscreen 1680x1050 resolution, but scaled down 25 percent, with 15 frames per second.
Be aware of using the --password argument as it will appear your password in plain text on the screen. You may use -p argument instead, it will prompt you to enter you password in hidden mode.
grep -- displays process ids
-v -- negates the matching, displays all but what is specified in the other options
-u -- specifies the user to display, or in this case negate
The process loops through all PIDs that are found by pgrep, then orders a forced kill to the processes in numerical order, effectively killing the parent processes first including the shells in use which will force the users to logout.
Tested on Slackware Linux 12.2 and Slackware-current
Handy if all you have is a console session or tty.
Depending on the network setup, you may not get the hostname.
Display which user run process from given port name
The --parents option will cause cp or mkdir to automatically create the parent directory structure.
mkdir --parents /one/two/three/dir
will create /one, /one/two, and /one/two/three as needed before creating dir. cp will copy files with their full directory structure into the target directory with this option.
Thanks to Peter Leung at:
which has good examples of usage.
Go to begin of the current command line.
Create a favicon suitable for use on your web site. Note: ppmtowinicon is part of libpbm, not ImageMagick.
This will lower the quality of mp3 files, but is necessary to play them on some mobile devices.
Download YouTube videos as .flv and convert them to .3gp for your mobile phone.
Use ImageMagick to create a "black and white" copy of an image.
Example: To store the function addfunction after you have defined it:
An alias i made for myself to play music in a faster way.
Works great when you have Guake / Tilda installed (Console that drops down like in the game QUAKE)
I put this in my bash_alias file (I'm on ubuntu, the bash_alias file does autostart with the right config) but it works putting it in bashrc too. Or anything that autostarts when the console is opened.
Needs Mplayer and music files to work. With out music theres nothing to play!
Oh, and also, without modification, this alias will try to play stuff from your ~/Music folder! (case sensitive). Make sure that folder exists and has music OR edit this alias to fit your needs.