[我正在尝试使用tar将单个文件分成足够小的部分以适合Solaris 5.8上的1.44MB软盘。
根据下面的参考,我应该能够通过使用k选项来指定段的大小,并使用f选项来指定输出文件来实现。
我尝试过各种格式的命令:
tar cvf -k 1378 <output file> <input file>
tar cvf <output file> <input file> -k 1378
tar cvf <output file> -k 1378 <input file>
充其量,它会生成一个文件,其中一个选项的名称与原始文件的大小相同。
提供的tar实用程序不同于大多数现代Linux系统上可用的GNU tar实用程序。 gtar不可用。我无法在此系统上安装新软件包。
或者,您是否知道Solaris 5.8基本安装中存在的任何其他实用程序?
参考:
例如,我选择了使用dd在段中跨文件移动的'unclean'方法
dd if=input.file of=output.file.part-1 bs=1378 count=1 skip=0
dd if=input.file of=output.file.part-2 bs=1378 count=1 skip=1
dd if=input.file of=output.file.part-3 bs=1378 count=1 skip=2
dd if=input.file of=output.file.part-n bs=1378 count=1 skip=n-1...
然后在另一端重新组装:
dd if=input.file-part1 of=output.file bs=1378 count=1 seek=0
dd if=input.file-part2 of=output.file bs=1378 count=1 seek=1
dd if=input.file-part3 of=output.file bs=1378 count=1 seek=2
dd if=input.file-partn of=output.file bs=1378 count=1 seek=n-1...
[可能有更好的方法,但这似乎达到了目的。