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

grep for minus (-) sign
Use flag "--" to stop switch parsing

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

display ip address
add this alias in .bashrc to fast check the ip address of your modem router alias myip="curl -s http://myip.dk | grep '' | sed -e 's/]*>//g'"

Set all CPU cores' CPU frequency scaling governor to maximum performance

Install pip with Proxy
Installs pip packages defining a proxy

check open ports without netstat or lsof

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Real time duplication of Apache app traffic to a second server
This takes the stream created by apache requests containing jsp and funnels them to another server. I'm using this for simulating real time traffic. The nice command gives ssh maximum CPU cycles, awk & grep strip out everything served by apache. Putting parallel on curl is important because curl is synchronous and waits for the response. Yes, I thought about using wget but it didn't seem any easier. Also, if you figure out how to run this in the background let me know. Every time I background it it stops. If you have multiple front end servers just run multiple instances of this.

Dump android contacts, sms
Crude, but works. Note for security, /data/ will be inaccessible unless your device has been *rooted*. On the other hand, if a device has been rooted, its data is now wide open to anyone with a USB cable and the above "one-liner". `adb` is one of the platform tools in the android SDK. To get SMS messages: $ adb pull /data/data/com.android.providers.telephony/databases/mmssms.db ; sqlite3 -batch

resize all JPG images in folder and create new images (w/o overwriting)
Convert all jpegs in the current directory into ~1024*768 pixels and ~ 150 KBytes jpegs


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: