Tacoen's shared code-snipsets
#!/usr/bin/perl # # untuk membersihkan file yang diakses terakhir $hari # di directory $path # my $hari = 49; my $path = $ARGV[1]; my $query = $ARGV[0]; if ((!$query) && (!$path)) { print "Sytanx: rdelete [pattern] [path]\n"; exit } &destroy(`find $path -iname $query`); sub destroy { my @filelist = @_; foreach $file(@filelist) { chomp($file); print "$file\n"; unlink "$file"; } } reset; exit;
Posting Komentar