d --> delete !d ---> delete others
The quality ranges between 0 to 9, with the smaller number indicates a higher quality file but bigger too.
Next time you see a mac fanboy bragging about 64-bitness of 10.6 give him this so he might sh? Show Sample Output
Used it on daily basis, not sure if it's any better than the OPs version, tho' One advantage is - you can replace 'bash' at the end of the line with eg. cat - to check if the generated command is OK. Show Sample Output
Perl version - just for completeness sake ;)
Uses Unicode combining characters to produce strikethrough effect. Since commandlinefu doesn't display Unicode properly, you will need to replace the dash in the code above with the Unicode long stroke overlay (U+0336).
rsync by itself doesn't support copying between two remote hosts, but if you use sshfs you can pretend one of them is local. If you have a passphrase-less ssh-key, you can even put this script into a cron job. A faster alternative is to run ssh-keygen on remote1 and put the pubkey into remote2:~/.ssh/authorized_keys, running rsync on remote1 (or vice versa), but the problem with that is that now a hacker on remote1 can access remote2 at any time. The above method ensures your local computer stays the weak link. Show Sample Output
Git uses secure hash sums for its revision numbers. I'm sure this is fine and dandy for ultra-secure computing, but it's less than optimal for humans. Thus, this will give you sequential revision numbers in Git all the way from the first commit.
Per country GET report, based on access log. Easy to transform to unique IP Show Sample Output
You cannot kill zombies, as they are already dead. But if you have too many zombies then kill parent process or restart service. You can kill zombie process using PID obtained from the above command. For example kill zombie proces having PID 4104: # kill -9 4104 Please note that kill -9 does not guarantee to kill a zombie process.
This alternative cleans HISTTIMEFORMAT environment variable and calls gnuplot just after /tmp/cmds is closed, to avoid some errors.
For debian likes, that's in python-xml package.
tail() { thbin="/usr/bin/tail"; if [ "${1:0:1}" != "-" ]; then fc=$(($#==0?1:$#)); lpf="$((($LINES - 3 - 2 * $fc) / $fc))"; lpf="$(($lpf<1?2:$lpf))"; [ $fc -eq 1 ] && $thbin -n $lpf "$@" | /usr/bin/fold -w $COLUMNS | $thbin -n $lpf || $thbin -n $lpf "$@"; else $thbin "$@"; fi; unset lpf fc thbin; }
This is a function that implements an improved version of tail. It tries to limit the number of lines so that the screen is filled completely. It works with pipes, single and multiple files. If you add different options to tail, they will overwrite the settings from the function.
It doesn't work very well when too many files (with wrapped lines) are specified.
Its optimised for my three-line prompt.
It also works for head. Just s/tail/head/g
Don't set 'thbin="tail"', this might lead to a forkbomb.
Where "docname" is the document you want OS-X to image... file.txt, file.pdf, file.mov, etc Show Sample Output
Use one CPU core entirely.
Change lang from ru to something else. Curl version - Mac OS etc, any system w/o wget. Show Sample Output
Explination: https://stackoverflow.com/questions/2257441/random-string-generation-with-upper-case-letters-and-digits/23728630#23728630 Why 16 Characters: https://www.wired.com/story/7-steps-to-password-perfection/ Show Sample Output
needs no GNU tools, as far as I see it
why would you want to convert mp3's to ogg? 1 reason is because ardour doesn't support mp3 files because of legal issues. this is really the only reason you would do this, unless you have really bad hearing and also want smaller file sizes, because converting from one lossy format to another isn't a good idea. Show Sample Output
For BSD-based systems, including OS X, that don't have seq.
This version provides a default using tput in case $COLUMNS is not set:
jot -b '#' -s '' ${COLUMNS:-$(tput cols)}
Show Sample Output
This command is useful when you are programming, for example.
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: