Leser: 3
5 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use File::Find;
my $myRoot;
$myRoot = "/home/50000";
find(\&myFileFilter, $myRoot); # ab Verzeichnis $myRoot suchen
sub myFileFilter
{
my $File;
#$_ enthält kompletten Pfad (Verzeichnis und Dateinamen)
#$File::Find::dir enthält aktuelles Verzeichnis
$File::Find::dir = "10047";
#$File::Find::name = "test.html";
}
print find(\&myFileFilter, $myRoot);
1
2
3
4
5
6
7
8
9
10
11
12
13
use File::Find;
my $myRoot;
$myRoot = "/home/50000";
find(\&myFileFilter, $myRoot); # ab Verzeichnis $myRoot suchen
sub myFileFilter
{
my $name = $File::Find::name;
if($name =~ /10047$/ and -d $name){
print $name;
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
my $myRoot;
$myRoot = "/home/56501";
find(\&myFileFilter, $myRoot);
sub myFileFilter
{
my $name = $File::Find::name;
if($name =~ /caches$/ and -d $name)
{
#print $name ."\n";
chmod(0777,$name);
print $name."\n";
my $filename;
chdir $name;
foreach $filename (<*.html>)
{
print $filename."\n";
chown("56666","65533",$filename);
}
}
}
1
2
3
4
5
6
foreach my $filename (<$name/*.html>)
{
print $filename."\n";
chown("56666","65533",$filename);
}
1
2
3
4
5
6
7
8
9
10
11
my $filename;
chdir $name;
foreach $filename (<*.html>)
{
print $filename."\n";
chown("56666","65533",$filename);
}
5 Einträge, 1 Seite |