1
2
3
4
5
6
7
8
|
show > block >
/tmp/1
.txt
show >
exit
过滤掉version, filecount, size, del_file, del_size这几个字段全部为0的那些block_id,剩下的block上都存有实际的数据。
grep
-
v
'0 0 0 0 0'
/tmp/1
.txt >
/tmp/2
.txt
取出block_id号
cut
-c 1-10
/tmp/2
.txt >
/tmp/3
.txt
缩进空格
for
i
in
$(
cat
/tmp/3
.txt);
do
echo
$i >>
/tmp/4
.txt;
done
|
1
|
/usr/local/tfs/bin/sync_by_blk
-s 192.168.1.230:8108 -d 192.168.1.155:8108 -f
/tmp/4
.txt -m 20141121
|
1
2
3
4
5
6
7
|
cd
logs
[root@localhost logs]
# cat sync_done_blk |wc -l
168
[root@localhost logs]
# cat sync_fail_file | wc -l
0
[root@localhost logs]
# cat sync_succ_file | wc -l
|