|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T e
Length: 785 (0x311) Types: TextFile Names: »empty«
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen └─⟦b5330643c⟧ »./cops/perl-4.019/perl.tar.Z« └─⟦2b9a58213⟧ └─⟦this⟧ »perl-4.019/eg/van/empty«
#!/usr/bin/perl # $Header: empty,v 4.0 91/03/20 01:15:25 lwall Locked $ # This script empties a trashcan. $recursive = shift if $ARGV[0] eq '-r'; @ARGV = '.' if $#ARGV < 0; chop($pwd = `pwd`); dir: foreach $dir (@ARGV) { unless (chdir $dir) { print stderr "Can't find directory $dir: $!\n"; next dir; } if ($recursive) { do cmd('find . -name .deleted -exec /bin/rm -rf {} ;'); } else { if (-d '.deleted') { do cmd('rm -rf .deleted'); } else { if ($dir eq '.' && $pwd =~ m|/\.deleted$|) { chdir '..'; do cmd('rm -rf .deleted'); } else { print stderr "No trashcan found in directory $dir\n"; } } } } continue { chdir $pwd; } # force direct execution with no shell sub cmd { system split(' ',join(' ',@_)); }