Help for this page

Select Code to Download


  1. or download this
    $ cpio --list -i <td.cpio
    .
    ...
    t3
    1 block
    $
    
  2. or download this
    #!/opt/ActivePerl-5.12/bin/perl
    use Archive::Cpio;
    ...
    $cpio->read('td.cpio');
    $cpio->remove('t1');
    $cpio->write('tdnew.cpio');
    
  3. or download this
    sub remove {
        my ($cpio, @filenames) = @_;
    ...
        my %filenames = map { $_ => 1 } @filenames;
        @{$cpio->{list}} = grep { !$filenames{$_} } @{$cpio->{list}};
    }