日期:2014-05-16 浏览次数:20778 次
#!/bin/sh
for f in `find ./testdir -type f`;
do
if [ -s $f ];then
echo $f is not empty.
echo copy $f
cp $f ~/backup
else
echo $f is empty.
fi
done
#!/bin/bash
find /etc -type f > list.txt
while read line; do
size=$(ls -l $line
------解决方案--------------------
awk '{print $5}')
if [[ $size != 0 ]]; then
cp $line /tmp/
fi
done < list.txt