Z
Zebee Johnstone
I want to archive directories to CD. I have many of them in
various places, I don't care if one from /data/web is on the
same CD as one from /home as long as the specified directory is
not split any further.
The important point is that there are things I need to exclude, such as
log files.
I'm currently getting the size by using du in an open, and munging
the result, is there a better way?
open (DU,"find $snapshot -type d -maxdepth 1 -exec du -sk --exclude=access_log* --exclude=error_log* {} \\;|") || die "can't do find for $snapshot $!\n";
I did think of using stat to add up every file, but if I'm talking
a few hundred per directory, is that wise? And how would I exclude
files, considering that each main directory set has more than one file
pattern to exclude? (this has 2, others have 3 or 4)
Zebee
various places, I don't care if one from /data/web is on the
same CD as one from /home as long as the specified directory is
not split any further.
The important point is that there are things I need to exclude, such as
log files.
I'm currently getting the size by using du in an open, and munging
the result, is there a better way?
open (DU,"find $snapshot -type d -maxdepth 1 -exec du -sk --exclude=access_log* --exclude=error_log* {} \\;|") || die "can't do find for $snapshot $!\n";
I did think of using stat to add up every file, but if I'm talking
a few hundred per directory, is that wise? And how would I exclude
files, considering that each main directory set has more than one file
pattern to exclude? (this has 2, others have 3 or 4)
Zebee