Commands tagged zsh (81)

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

Display list of available printers

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

To get internet connection information .
To get the connection information of protocol tcp and extended infortmation.

Get your public ip using dyndns

Make .bashrc function to backup the data you changed last houres
The original overwrites any previous backups, and only saves exactly the last hours worth, but not 1 hour + 1 minute. This version creates or appends files, and backs up everything since the last backup (using the backups timestamp as the reference), plus it uses TMPDIR if set.

Install an mpkg from the command line on OSX
Installing most OSX apps is just a matter of dropping it in /Applications, either GUI-wise or with cp -r. However, many packages are distributed in "mpkg" format, and those have to be installed with an installer. If you don't want to go to the trouble of firing up VNC to install an mpkg, you can use the "installer" command. This will install an application from a .mpkg it to /Applications system-wide. To install a program for just one user, replace "-target /" with "-target username".

Text message on wallpaper
Display some text on the wallpaper especially warning messages

Get your outgoing IP address
should be very consistent cause it's google :-)

Display any tcp connections to apache
Sometimes apache will get stuck in an established state where you can't get a list of the connecting IP's from mod_status... not a good thing when you need to ban an abusive ip.

'hpc' in the box - starts a maximum of n compute commands modulo n controlled in parallel
the block of the loop is useful whenever you have huge junks of similar jobs, e.g., convert high res images to thumbnails, and make usage out of all the SMP power on your compute box without flooding the system. note: c is used as counter and the random sleep $ r=`echo $RANDOM%5 |bc`; echo "sleep $r"; sleep $r is just used as a dummy command.


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: