文章目录

以前在verycd上面下载高清电影的时候经常会看到一些.par2文件,当时一直不知道是干什么用的。通过度娘的查找才知道原来这个是quickpar软件生成的一些冗余纠错数据。下载高清影片都十来个G的数据,如果中间出错了会很痛苦,现在有了par2,可以用这个来纠错。冗余度越高,能纠错的范围就越大。但这个quickpar是windows上的软件,好在linux下有个命令行的par2。

在ubuntu上安装par2:

sudo apt-get install par2

在archlinux上安装par2:

pacman -S par2cmdline

英文提示如下:

par2cmdline version 0.5.4
Copyright (C) 2003 Peter Brian Clements.
Copyright (C) 2011-2012 eMPee584.
Copyright (C) 2012 Ike Devolder.

par2cmdline comes with ABSOLUTELY NO WARRANTY.

This is free software, and you are welcome to redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version. See COPYING for details.


Usage:

  par2 c(reate) [options] <par2 file> [files] : Create PAR2 files
  par2 v(erify) [options] <par2 file> [files] : Verify files using PAR2 file
  par2 r(epair) [options] <par2 file> [files] : Repair files using PAR2 files

You may also leave out the "c", "v", and "r" commands by using "par2create",
"par2verify", or "par2repair" instead.

Options:

  -b<n>  : Set the Block-Count
  -s<n>  : Set the Block-Size (Don't use both -b and -s)
  -r<n>  : Level of Redundancy (%%)
  -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)
  -m<n>  : Memory (in MB) to use
  -v [-v]: Be more verbose
  -q [-q]: Be more quiet (-q -q gives silence)
  --     : Treat all remaining CommandLine as filenames

If you wish to create par2 files for a single source file, you may leave
out the name of the par2 file from the command line.

平时创建par2文件只要用:

par2 c -r3 -n1 a.mp4.par2 a.mp4

-r3是指3%的冗余,-n1是只用一个冗余数据文件,如果不加这个会出现很多个par2文件。

文章目录