Tools: February 2008 Archives

Marcel GrĂ¼nauer posted to his Twitter account that he freed up 3 GB by removing non-English localization resource files (*.lproj) with the following command:

find / \
    \! -name 'English.lproj' \
    \! -name 'en.lproj' \
    -name '*.lproj' -type d \
    -exec rm -rf -- {} \; -prune

If you want to make sure you're deleting the right files before you delete them, see the list of the .ljprojf files first:

find / \
    \! -name 'English.lproj' \
    \! -name 'en.lproj' \
    -name '*.lproj' -type d -print -prune

Leopard cheat sheet

| | Comments (0)

Here's a handy little cheat sheet for Mac OS X Leopard from O'Reilly. I didn't realize there were so many Finder shortcuts! Command-T puts something in the sidebar! Command-Shift-G lets you type in a folder name! Cool!

On the perl-qa list tonight, we were discussing how best to find all the modules used in a source tree. To do the job right, you'd have to run the code and then look at the %INC:: hash, which shows the paths of all modules loaded. The low-tech and usually-good-enough solutions we came up with use ack:

$ ack -h '^use\s+(\w+(?:::\w+)*).*' --output=\$1 | sort -u

Thanks to Andy Armstrong for coming up with a better regex than mine, which assumed that the use statement would necessarily end with a semicolon.

About this Archive

This page is a archive of entries in the Tools category from February 2008.

Tools: January 2008 is the previous archive.

Tools: March 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Other Perl Sites

Other Swell Blogs

  • geek2geek: An ongoing analysis of how geeks communicate, how we fail and how to fix it.