#!/usr/bin/perl # $RCSfile: findtar,v $$Revision: 1.5 $$Date: 2001/05/24 18:35:03 $ # findtar takes find-style arguments and spits out a tarfile on stdout. # It won't work unless your find supports -ls and your tar the I flag. $args = join(' ',@ARGV); open(find,"/usr/bin/find $args -ls |") || die "Can't run find for you."; open(tar,"| /bin/tar cIf - -") || die "Can't run tar for you: $!"; while () { @x = split(' '); if ($x[2] =~ /^d/) { print tar '-d ';} print tar $x[10],"\n"; }