1 Star 0 Fork 33

康后银/kernel

forked from src-anolis-os/kernel 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
parallel_xz.sh 731 Bytes
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:35 . import kernel-4.18.0-193.el8.src.rpm
#!/bin/sh
# Reads filenames on stdin, xz-compresses each in place.
# Not optimal for "compress relatively few, large files" scenario!
# How many xz's to run in parallel:
procgroup=""
while test "$#" != 0; do
# Get it from -jNUM
N="${1#-j}"
if test "$N" = "$1"; then
# Not -j<something> - warn and ignore
echo "parallel_xz: warning: unrecognized argument: '$1'"
else
procgroup="$N"
fi
shift
done
# If told to use only one cpu:
test "$procgroup" || exec xargs -r xz
test "$procgroup" = 1 && exec xargs -r xz
# xz has some startup cost. If files are really small,
# this cost might be significant. To combat this,
# process several files (in sequence) by each xz process via -n 16:
exec xargs -r -n 16 -P $procgroup xz
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kanghou-silver/kernel.git
git@gitee.com:kanghou-silver/kernel.git
kanghou-silver
kernel
kernel
a8

搜索帮助