• Get the Flash Player to see the slideshow.
  • Categories

  • Authors

  • Great Quotes

    Good walking leaves no tracks good talking reveals no flaws good counting counts no beads
    good closing locks no locks and yet it can’t be opened
    — Lao Tzu - Tao Te Ching

Get in touch...

To have a chat about
your CMS needs...

Call us 0207 193 2014
or
Email us on

Perl Magic One Liners

July 2nd, 2008 by Gavin Colborne

This page is dedicated to all the quick one line utilities that are useful when managing an
Interwoven system or any other system that uses many files.

Find all files without metadata of content_type:

find . -name '*.xml' -exec /iw-home/iw-perl/bin/iwperl -e
'$file=shift;system("/iw-home/bin/iwextattr", -g=>
"TeamSite/Metadata/content_type", $file);warn "$file\n"
if $?' {} ';' >/dev/null

Regenerate Recursively

find . -name \*.xml -exec iwregen {} ';'

Check Socket Connection

This is useful to see if firewall is open when debugging OpenDeploy
(Thanks to Steve Martina for this one back in 2001):

/iw-home/iw-perl/bin/iwperl -MIO::Socket -e "$s=new IO::Socket::INET
(PeerAddr=>'localhost',PeerPort=>80,Proto=>'tcp'); print $s?'OK':'fail'"

List the deleted but unsubmitted files in an area (. current dir)

/iw-home/bin/iwlistmod . | grep x+

Leave a Reply

You must be logged in to post a comment.