go-fastdfs/gen_file.py

10 lines
234 B
Python
Raw Normal View History

2019-01-28 21:42:28 +08:00
# -*- coding: utf-8 -*-
import os
2019-10-09 16:59:21 +08:00
import random
2019-01-28 21:42:28 +08:00
j=0
for i in range(0,1000000):
if i%1000==0:
j=i
2019-04-03 09:59:34 +08:00
os.system('mkdir -p %s'%(i))
2019-01-28 21:42:28 +08:00
with open('%s/%s.txt'%(j,i),'w+') as f:
2019-10-09 16:59:21 +08:00
f.write(str(random.random())*100000)