|< 1 2 >| | 13 Einträge, 2 Seiten |
QuoteIf You don't know what it does, why do you put it in your code
1
2
3
print +(a=>b=>c=>d=>e=>f=>g=>h=>i=>j=>k=>l=>m=>n=>o=>p=>q=>r=>s=>t=>u=>v=>w=>x=>y=>z=>" ")
[9=>20=>18=>19=>-1=>0=>13=>14=>19=>7=>4=>17=>-1=>15=>4=>17=>11=>-1=>7=>0=>2=>10=>4=>17];
tar -cvf archiv.tar /home/user
QuoteIf You don't know what it does, why do you put it in your code
1
2
3
print +(a=>b=>c=>d=>e=>f=>g=>h=>i=>j=>k=>l=>m=>n=>o=>p=>q=>r=>s=>t=>u=>v=>w=>x=>y=>z=>" ")
[9=>20=>18=>19=>-1=>0=>13=>14=>19=>7=>4=>17=>-1=>15=>4=>17=>11=>-1=>7=>0=>2=>10=>4=>17];
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
sub use_tar_dirs {
print "=> Using TAR Compression Method\n";
print "=> Compressing Directories\n";
my $tar = Archive::Tar->new;
my $dirs = $_[0];
my @dirs = s2a($dirs);
my $dir = $_[2];
my $tarname = $_[1];
unlink($tarname);
$tar->add_files( './'.$dir.'/'.@dirs );
$tar->write($tarname.'.tar');
}
sub s2a {
my $s = $_[0];
my @a = split(/,/, $s);
return(@a);
}
QuoteIf You don't know what it does, why do you put it in your code
1
2
3
print +(a=>b=>c=>d=>e=>f=>g=>h=>i=>j=>k=>l=>m=>n=>o=>p=>q=>r=>s=>t=>u=>v=>w=>x=>y=>z=>" ")
[9=>20=>18=>19=>-1=>0=>13=>14=>19=>7=>4=>17=>-1=>15=>4=>17=>11=>-1=>7=>0=>2=>10=>4=>17];
1
2
3
sub use_tar_dirs {
print "=> Using TAR Compression Method\n";
print "=> Compressing Directories\n";
QuoteIf You don't know what it does, why do you put it in your code
1
2
3
print +(a=>b=>c=>d=>e=>f=>g=>h=>i=>j=>k=>l=>m=>n=>o=>p=>q=>r=>s=>t=>u=>v=>w=>x=>y=>z=>" ")
[9=>20=>18=>19=>-1=>0=>13=>14=>19=>7=>4=>17=>-1=>15=>4=>17=>11=>-1=>7=>0=>2=>10=>4=>17];
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
use File::Find;
use Archive::Tar;
my @files;
sub use_tar_dirs {
print "=> Using TAR Compression Method\n";
print "=> Compressing Directories\n";
my $tar = Archive::Tar->new;
my $dirs = $_[0];
my @dirs = s2a($dirs);
foreach(@dirs) {
find(\&addfile, $_);
}
$tar->add_files( @files);
$tar->write($tarname.'.tar');
}
sub s2a {
my $s = $_[0];
my @a = split(/,/, $s);
return(@a);
}
sub addfile { push @files, $File::Find::name; }
|< 1 2 >| | 13 Einträge, 2 Seiten |