Commands tagged xargs (148)

What's this?

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.

Share Your Commands


Check These Out

check the status of 'dd' in progress (OS X)
Your platform may not have pv by default. If you are using Homebew on OSX, simply 'brew install pv'.

Create multiple mp4 files using avidemux
Convert multiple files using avidemux. Version updated (thanks to the guys who helped me giving me hints about how to improve the command). Works with files whose name contains blank characters. One of the reasons why I love open source: everyone can take something "done" and improve it to make it better! If u have suggestions, please let me know.

Create backup copy of file, adding suffix of the date of the file modification (NOT today's date)

Erase a word

Display IP : Count of failed login attempts
The lastb command presents you with the history of failed login attempts (stored in /var/log/btmp). The reference file is read/write by root only by default. This can be quite an exhaustive list with lots of bots hammering away at your machine. Sometimes it is more important to see the scale of things, or in this case the volume of failed logins tied to each source IP. The awk statement determines if the 3rd element is an IP address, and if so increments the running count of failed login attempts associated with it. When done it prints the IP and count. The sort statement sorts numerically (-n) by column 3 (-k 3), so you can see the most aggressive sources of login attempts. Note that the ':' character is the 2nd column, and that the -n and -k can be combined to -nk. Please be aware that the btmp file will contain every instance of a failed login unless explicitly rolled over. It should be safe to delete/archive this file after you've processed it.

auto complete arguments
Use it for command like : mkdir, chown, ls, less...

quickly backup or copy a file with bash

infile search and replace on N files (including backup of the files)
the addition of ".bk" to the regular "pie" idiom makes perl create a backup of every file with the extension ".bk", in case it b0rks something and you want it back

dd if=/dev/null of=/dev/sda
removes all files/filesystems of a harddisk. It removes EVERYTHING of your hard disk. Be carefull when to select a device. It does not prompt for and second check.

Remove an IP address ban that has been errantly blacklisted by denyhosts
download the denyhosts-remove script from http://www.atrixnet.com/remove-an-ip-address-ban-that-has-been-errantly-blacklisted-by-denyhosts/


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: