Unix/Linux scripts, tips and tricks

Scripts

jargrep: scan a number of jar/zip/war/ear files all at once grepping for pattern. jargrep

google: command line access to google (uses wget). google

Tips

Multi-file search and replace

This is a one-liner on the command line. In all files that match *.ext replace “preString” with “postString”.

find . -type f -iname "*.ext" -exec sed -i -e "s/preString/postString/g" {} \;

To manage printers through cups:

In a webbrowser go to your linux server ip on port 631:

http://MyIP:631/

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply