You'll probably want to pass in the -rf options if you have to delete a directory or something.
Improved google text-to-speech function. Allows to specify language, plays sound in terminal. Automatically removes downloaded file after successfully processing.
Usage:
say LANGUAGE TEXT
Examples:
say en "This is a test."
say pl "To jest test"
deletes logs not modified in over [#] days - modify to compress or move, as needed
Removes all unversioned files and folders from an svn repository. Also:
svn status --no-ignore | grep ^I | awk '{print $2}' | xargs rm -rf
will remove those files which svn status ignores. Handy to add to a script which is in your path so you can run it from any repository (a la 'svn_clean.sh').
command | my_irc
Pipe whatever you want to this function, it will, if everything goes well, be redirected to a channel or a user on an IRC server.
Please note that :
- I am not responsible of flood excesses you might provoke.
- that function does not reply to PINGs from the server. That's the reason why I first write in a temporary file. Indeed, I don't want to wait for inputs while being connected to the server. However, according to the configuration of the server and the length of your file, you may timeout before finishing.
- Concerning the server, the variable content must be on the form "irc.server.org 6667" (or any other port). If you want to make some tests, you can also create a fake IRC server on "localhost 55555" by using
netcat -l -p 55555
- Concerning the target, you can choose a channel (beginning with a '#' like "#chan") or a user (like "user")
- The other variables have obvious names.
Show Sample Output
Remove everything in current directory except files starting with "ca".
USAGE: gate listening_port host port Creates listening socket and connects to remote device at host:port. It uses pipes for connection between two sockets. Traffic which goes through pipes is wrote to stdout. I use it for debug network scripts.
Convert all PNG images in directory to JPEG using ImageMagick, and delete the old PNG images.
You're a developer - but it doesn't mean you have to slum it! Why not spice up your man page lookups by using a decent PDF viewer. I use 'xpdf' - maybe you prefer acroread, whatever, it's just as fast as plain dull ASCII on today's machines and you can still search for stuff - that's the main reason I use PDF and not PS.
rm-but() { ls -Q | grep -v "$1" | xargs rm -r ; }
Add this to your .bashrc file.
Then whenever you need to remove all files/directories but one from present working directory. Run:
rm-but <important-file-or-directory>
Notes:
1. This doesn't affect the hidden files.
2. Argument is actually as string. And all files/directories having this string in there name are left untouched.
This is for zsh with extended globbing.
If you want to turn a Git repo into the origin that folks can push to, you should make it a bare repository. See: http://stackoverflow.com/questions/2199897/git-convert-normal-to-bare-repository
Removes all png files whose geometry is not 280x190 pixels
Use the command to create a script and bind it to a key using keyboard shortcut. eg: Script locks the screen in a loop until the command is executed again.At first it
It does not work without the verbose mode (-v is important)
works only in zsh
Better than:
nodetool clearsnapshot
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: