【发布时间】:2015-05-07 06:52:38
【问题描述】:
我可以串行运行,但不能并行运行。我的代码如下:
#!/bin/bash
while :
do
for i in `find ~/Mainstore-1/ -maxdepth 1 -type f`
do
md5sum $i
done
sleep 1
done
【问题讨论】:
-
Don't iterate the results of
findlike that! 如果文件名中包含空格,您认为会发生什么?并引用你的变量! -
while循环的目的是什么?您是否希望文件会随着时间的推移而更改,或者会添加新文件? -
我希望新文件会添加到该目录中