Mery84 has asked for the wisdom of the Perl Monks concerning the following question:
/cache/00/ /cache/01/ /cache/01/aa/ /cache/_01/ /cache/_01/aa/
It`ll rip off whole cache directory, it is possible to handle exclusions in rmtree?#!/usr/bin/perl use warnings; use strict; use File::Find; use File::Path qw(make_path remove_tree); my $path="/opt/ssi/www/shop_templates/cache"; rmtree($path) or die "Cannot rmtree '$path' : $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Rmtree with exclude
by jellisii2 (Hermit) on Dec 01, 2014 at 13:00 UTC | |
|
Re: Rmtree with exclude
by Arunbear (Prior) on Dec 01, 2014 at 16:45 UTC | |
|
Re: Rmtree with exclude
by vinoth.ree (Monsignor) on Dec 01, 2014 at 14:49 UTC | |
|
Re: Rmtree with exclude
by james28909 (Deacon) on Dec 01, 2014 at 16:42 UTC | |
by Mery84 (Novice) on Dec 02, 2014 at 12:05 UTC | |
by james28909 (Deacon) on Dec 02, 2014 at 20:53 UTC | |
|
Re: Rmtree with exclude
by Anonymous Monk on Dec 02, 2014 at 02:34 UTC |