克隆具有大量子模块的git存储库需要很长时间.在以下示例中是~100个子模块
git clone --recursive https://github.com/Whonix/Whonix
Run Code Online (Sandbox Code Playgroud)
Git一个接一个地克隆它们.比需要的时间长得多.让(可能)假设客户端和服务器都有足够的资源同时回答多个(并行)请求.
如何使用git clone --recursive
?加速/并行化git子模块的下载?
我刚才读过一些bash FAQ(我不记得了),which
应该避免和command -v
首选.
为什么会这样?任何一个的优点和缺点是什么?
通常的工作流程是,git标签验证.
git tag -v tagname
Run Code Online (Sandbox Code Playgroud)
然后git标签结帐.
git checkout tagname
Run Code Online (Sandbox Code Playgroud)
是否有组合命令来验证标记,显示验证,并在验证成功时检查它?
我可以用来parted
找出图像的偏移量。
sudo parted -s image.img unit B print
Model: (file)
Disk /home/user/image.img: 107374182400B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 2097152B 107374182399B 107372085248B primary ext4
Run Code Online (Sandbox Code Playgroud)
例如,分区从 开始2097152
。
2097152
我怎样才能用 bash 脚本得到它?
我可能可以解析输出,但也许有更合适的方法?
例如,
echo "$(( ($(od -An -N2 -i /dev/random) )%(1000-0+1) ))"
Run Code Online (Sandbox Code Playgroud)
可以使用.但它不适用于更大的数字.
如何在bash中获得0到999999999之间的随机(/ dev/random)数字?
有没有人有更新的命中小姐标题为Varnish 4工作?
我找到的最后一个是版本3.
https://www.varnish-cache.org/trac/wiki/VCLExampleHitMissHeader#Varnish3.0
寻找这些:
set beresp.http.X-Cacheable = "NO:Not Cacheable"; "NO:Got Session";
"NO:Cache-Control=private"; "YES";
可能还有其他有用的调试输出,以解决为什么错过请求
bash ×3
git ×2
caching ×1
download ×1
git-checkout ×1
git-clone ×1
git-tag ×1
mbr ×1
offset ×1
performance ×1
random ×1
security ×1
varnish ×1
varnish-vcl ×1
verification ×1
which ×1