/, Perl/Perl Magic One Liners

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+
By |2008-07-02T09:25:53+00:00July 2nd, 2008|Magic One Liners, Perl|0 Comments

About the Author: