Parchive doesn't always deal with symbolic links well (or the way I'd
expect), specifically when the output files exist already as symbolic
links. The worst case is when you link the output to a file that doesn't
exist. It fails to write output, and it deletes the links.
It works fine when input files are symbolic links.
kyle@firebee ~/partest/inlink $ ls -l
total 8
-rw------- 1 kyle kyle 17 Sep 24 19:29 file1
-rw------- 1 kyle kyle 16 Sep 24 19:29 file2
lrwxrwxrwx 1 kyle kyle 5 Sep 24 19:29 input1 -> file1
lrwxrwxrwx 1 kyle kyle 5 Sep 24 19:29 input2 -> file2
kyle@firebee ~/partest/inlink $ parchive a -n2 out.par input*
Adding to out.par
input1 - OK
input2 - OK
Creating PAR volumes:
0%100%
out.p02 - OK
out.p01 - OK
kyle@firebee ~/partest/inlink $ ls -l
total 20
-rw------- 1 kyle kyle 17 Sep 24 19:29 file1
-rw------- 1 kyle kyle 16 Sep 24 19:29 file2
lrwxrwxrwx 1 kyle kyle 5 Sep 24 19:29 input1 -> file1
lrwxrwxrwx 1 kyle kyle 5 Sep 24 19:29 input2 -> file2
-rw------- 1 kyle kyle 249 Sep 24 19:42 out.p01
-rw------- 1 kyle kyle 249 Sep 24 19:42 out.p02
-rw------- 1 kyle kyle 232 Sep 24 19:42 out.par
==============================
If you link the output files to files that don't exist, parchive complains
that the files exist, and DELETES THE LINKS. Ouch!
I think it should create the missing files, and write to them. I wanted to
do this so that I could generate output on a drive different from my input.
kyle@firebee ~/partest/outlink-gone $ ls -l
total 8
-rw------- 1 kyle kyle 17 Sep 24 19:30 input1
-rw------- 1 kyle kyle 16 Sep 24 19:30 input2
lrwxrwxrwx 1 kyle kyle 8 Sep 24 19:41 out.p01 -> missing1
lrwxrwxrwx 1 kyle kyle 8 Sep 24 19:41 out.p02 -> missing2
kyle@firebee ~/partest/outlink-gone $ parchive a -n2 out.par input*
Adding to out.par
input1 - OK
input2 - OK
Creating PAR volumes:
0%WRITE ERROR: File exists
out.p02 - FAILED
out.p01 - FAILED
Errors occurred.
kyle@firebee ~/partest/outlink-gone $ ls -l
total 12
-rw------- 1 kyle kyle 17 Sep 24 19:30 input1
-rw------- 1 kyle kyle 16 Sep 24 19:30 input2
-rw------- 1 kyle kyle 232 Sep 24 19:42 out.par
==============================
If you link to /dev/null (a file that does exist), it'll skip over those
output files. It's not shown here, but if you ask for more output files,
it'll go ahead and make the extra files, skipping the linked ones. That's
fine with me, since I was trying to skip making those files anyway.
If you try this with existing plain files, you can see that it doesn't try
to write to them. Maybe it should; I'm not sure.
kyle@firebee ~/partest/outlink-null $ ls -l
total 8
-rw------- 1 kyle kyle 17 Sep 24 19:31 input1
-rw------- 1 kyle kyle 16 Sep 24 19:31 input2
lrwxrwxrwx 1 kyle kyle 9 Sep 24 19:30 out.p01 -> /dev/null
lrwxrwxrwx 1 kyle kyle 9 Sep 24 19:30 out.p02 -> /dev/null
kyle@firebee ~/partest/outlink-null $ parchive a -n2 out.par input*
Adding to out.par
input1 - OK
input2 - OK
Creating PAR volumes:
WRITE ERROR: out.p02: File exists
out.p02 - FAILED
WRITE ERROR: out.p01: File exists
out.p01 - FAILED
0%100%
Errors occurred.
kyle@firebee ~/partest/outlink-null $ ls -l
total 12
-rw------- 1 kyle kyle 17 Sep 24 19:31 input1
-rw------- 1 kyle kyle 16 Sep 24 19:31 input2
lrwxrwxrwx 1 kyle kyle 9 Sep 24 19:30 out.p01 -> /dev/null
lrwxrwxrwx 1 kyle kyle 9 Sep 24 19:30 out.p02 -> /dev/null
-rw------- 1 kyle kyle 232 Sep 24 19:42 out.par