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:
Control (stop, start, restart) a Windows Service from a Linux machine which has the `net` command (provided by samba).
This is a shortcut to tar up all files matching a wildcard. Tar doesn't have the --include (apparently).
A little aptitude magic. Note: this will remove images AND headers. If you just want to remove images: aptitude remove ?and(~i~nlinux-im ?not(~n`uname -r`))
I used this in zsh without any problems. I'm not sure how other shells will interpret some of the special characters used in the aptitude search terms. Use -s to simulate.
This should do the same thing and is about 70 chars shorter.
Uses inotifywait from inotify-tools ( http://wiki.github.com/rvoicilas/inotify-tools/ ), that is compatible only with linux.
Usefull when you work with files that have to be compiled.. latex, haml, c..
Get colorful fortunes dictated by an ASCII cow. For full enjoyment you'll need to have color setup enabled for your terminal.
if you dont want to alias also then you can do
killall rapidly_spawning_process ; !! ; !! ; !!
Use this if you can't type repeated killall commands fast enough to kill rapidly spawning processes.
If a process keeps spawning copies of itself too rapidly, it can do so faster than a single killall can catch them and kill them. Retyping the command at the prompt can be too slow too, even with command history retrieval.
Chaining a few killalls on single command line can start up the next killall more quickly. The first killall will get most of the processes, except for some that were starting up in the meanwhile, the second will get most of the rest, and the third mops up.
More recent versions of the date command finally have the ability to decode the unix epoch time into a human readable date. This function makes it simple to utilize this feature quickly.
Cleans all files in /tmp that have been accessed at least 2 days ago.
If you have lots of subversion working copies in one directory and want to see in which repositories they are stored, this will do the trick. Can be convenient if you need to move to a new subversion server.
not the best, uses 4 pipes!
previous version leaves lots of blank lines
Case Insensitive! and Works even if the "<title>...</title>" spans over multiple line.
the last person who posted used the most roundabout way to concatinate files, there's a reason there's a "conCATinate" command... Using this method, you also get to choose the order of the files, below another person just did *.txt > combined.txt which is fine but the order depends on the implementation of "cat" which is probably alphabetical order of filenames.
extension to tali713's random fact generator. It takes the output & sends it to notify-osd. Display time is proportional to the lengh of the fact.