You'll need to install proctools. MacPorts and Fink have this if you're running Mac OS X, check your Linux distribution's repositories if it isn't installed by default. Show Sample Output
It will only work if the service NETSEND in the Windows machine is enabled.
I use this command to start a local Python document server over HTTP port 8888.
lists the files found by find, waits for user input then uses xdg-open to open the selected file with the appropriate program.
usage: findopen path expression [command]
With the third optional input you can specify a command to use other than xdg-open, for example you could echo the filename to stdout then pipe it to another command.
To get it to work for files with spaces it gets a bit messier...
findopen() { files=( $(find "$1" -iname "$2" | tr ' ' '@') ); select file in "${files[@]//@/ }"; do ${3:-xdg-open} "$file"; break; done }
You can replace the @ with any character that probably wont be in a file name.
It seems to completely void the benefit of having an encrypted folder if you then have a script on your unencrypted hard drive with your password in it. This command will mount a truecrypt file at a given mount point after asking you for the password.
Get mac address listed for all interfaces. Show Sample Output
Grep for a named process. Show Sample Output
Will track your mouse and save it to a file.
You can use gnuplot to graph it:
gnuplot -persist <(echo "unset key;unset border;unset yzeroaxis;unset xtics;unset ytics;unset ztics;plot './mouse-tracking' with points lt 1 pt 6 ps variable")
Change the name of the process and what is echoed to suit your needs. The brackets around the h in the grep statement cause grep to skip over "grep httpd", it is the equivalent of grep -v grep although more elegant. Show Sample Output
Required: 1) Systems that send out alert emails when errors, database locks, etc occur. 2) a system that: a) has the ability to receive emails, and has procmail installed. b) has ssh keys set up to machines that would send out alerts. When procmail receives alert email, you can issue a command like this one (greps and awks may very - you're isolating the remote hostname that had the issue). This will pull process trees from the alerting machines, which is always useful in later analysis. Show Sample Output
First argument: string to put a box around. Second argument: character to use for box (default is '=') Same as command #4962, cleaned up, shortened, and more efficient. Now a ' * ' can be used as the box character, and the variables get unset so they don't mess with anything else you might have. They marked c++ as a function for this command, but I'm not sure why. Must be a bug. Show Sample Output
First argument: string to put a box around. Second argument: character to use for box (default is '=') Same as command #4948, but shorter, and without the utility function. Show Sample Output
Checks for PC samba name and workgroup. Works fine for Windows hosts and Linux/UNIX PCs running Samba. Show Sample Output
-d Draw the filename at the top-left of the image -F fullscreen -z randomize -D 1 - delay 1 second between changing slides This command will show images in subdirectories as well.
mplayer -vc null -vo null -ao pcm Firefly\ ep\ 10.avi -ss 195 -endpos 246 Will create file audiodump.wav with audio from second 195 to second 246 (the opnening theme).
-s must be a valid resolution. You can get a list of valid (and supported) resolutions via `xrandr`.
Assuming only VIM has *~ files in your current dir. If you have usefull data in a file named in the *~ pattern, DO NOT RUN this command!
commandlinefu.com 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.
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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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: