You may also leave out the "c", "v", and "r" commands by using "par2create", "par2verify", or "par2repair" instead.
Options: (all uses) -B<path> : Set the basepath to use as reference for the datafiles -v [-v] : Be more verbose -q [-q] : Be more quiet (-q -q gives silence) -m<n> : Memory (in MB) to use -t<n> : Number of threads used for main processing (6 detected) -T<n> : Number of files hashed in parallel (2 are the default) -- : Treat all following arguments as filenames Options: (verify or repair) -p : Purge backup files and par files on successful recovery or when no recovery is needed -N : Data skipping (find badly mispositioned data blocks) -S<n> : Skip leaway (distance +/- from expected block position) Options: (create) -a<file> : Set the main PAR2 archive name -b<n> : Set the Block-Count -s<n> : Set the Block-Size (don't use both -b and -s) -r<n> : Level of redundancy (%%) -r<c><n> : Redundancy target size, <c>=g(iga),m(ega),k(ilo) bytes -c<n> : Recovery Block-Count (don't use both -r and -c) -f<n> : First Recovery-Block-Number -u : Uniform recovery file sizes -l : Limit size of recovery files (don't use both -u and -l) -n<n> : Number of recovery files (don't use both -n and -l) -R : Recurse into subdirectories
Loading "demo.pdf.par2". Loaded 4 new packets Loading "demo.pdf.vol000+01.par2". Loaded 1 new packets including 1 recovery blocks Loading "demo.pdf.vol001+02.par2". Loaded 2 new packets including 2 recovery blocks Loading "demo.pdf.vol003+04.par2". Loaded 4 new packets including 4 recovery blocks Loading "demo.pdf.vol007+08.par2". Loaded 8 new packets including 8 recovery blocks Loading "demo.pdf.vol015+16.par2". Loaded 16 new packets including 16 recovery blocks Loading "demo.pdf.vol031+32.par2". Loaded 32 new packets including 32 recovery blocks Loading "demo.pdf.vol063+64.par2". Loaded 64 new packets including 64 recovery blocks Loading "demo.pdf.vol127+54.par2". Loaded 54 new packets including 54 recovery blocks Loading "demo.pdf.par2". No new packets found
There are 1 recoverable files and 0 other files. The block size used was 21196 bytes. There are a total of 2000 data blocks. The total size of the data files is 42384523 bytes.
Verifying source files:
Opening: "demo.pdf" Target: "demo.pdf" - found.
All files are correct, repair is not required.
表明文件未损坏,对文件使用十六进制编辑器进行随机修改,来模拟文件损坏情况,再执行 par -v 可得到如下输出:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# ... Verifying source files:
Opening: "demo.pdf" Target: "demo.pdf" - damaged. Found 1999 of 2000 data blocks.
Scanning extra files:
Repair is required. 1 file(s) exist but are damaged. You have 1999 out of 2000 data blocks available. You have 181 recovery blocks available. Repair is possible. You have an excess of 180 recovery blocks. 1 recovery blocks will be used to repair.
Opening: "demo.pdf" Target: "demo.pdf" - damaged. Found 1998 of 2000 data blocks.
Scanning extra files:
Repair is required. 1 file(s) exist but are damaged. You have 1998 out of 2000 data blocks available. You have 1 recovery blocks available. Repair is not possible. You need 1 more recovery blocks to be able to repair.
Pros: Fast verification. Fast recovery. Less disk space. Cons: Backup of damaged files is disabled. Less finding available source blocks. Cannot treat splited source files. Cannot treat additional source files. Cannot treat external source files. Risk of more data loss at failed recovery.