Perl Magic One Liners

2 July 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 "$filen"
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+

Our Latest News