Hello,
I would like to tar and compress my ports dir without the following 2 
directories:
a) distfiles
b) packages

Here is a gtar command I used that works well:
cd /usr && gtar -czpf ~/test.tar.gz --exclude=packages --exclude=distfiles ports

Actually I would like to do the same with the default openbsd tools ... but I 
can't :-((

I tried different commands ... but without success .... it does not work.
Using "find ... | xargs tar ..." does not work as expected, as it looks like 
xargs invokes the tar command multiple times. 
As a result, the ports.tar.gz file is overwritten and incomplete.

I tried a lot of combinations like:
cd /usr
find ports/ ! \( -type d -name packages -maxdepth 1 \) -and !  \( -type d -name 
distfiles -maxdepth 1 \) -print \
| xargs tar -czpf ~/ports.tar.gz;
This does not work .... the ports.tar.gz file is overwritten multiple times and 
at the end it is incomplete.
I also tried pax or tried to redirect the find command in a file ( find .. > 
files.txt), and use "cat files | xargs tar ..." same result :-(

How can achive my goal with the standard openbsd files (without installing 
gtar!)?

Thank you very much
didier

Reply via email to