下面是shell脚本的部分代码,改代码段是并发 gpg 加密
echo "gpg start...`date` "
#并发加密文件,缩短执行时间
for FILE in `ls -1 /backup/base*.tgz`
do
( gpg -er postgres -o ${FILE}.gpg ${FILE}
)&
done
wait
echo "gpg end...`date` "
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/1739.html