import sys, os
root = r"C:\py\results\csv" # внутри другие папки с csv-файлами
for path, subdirs, files in os.walk(root):
with open(os.path.join(path, "output.cvs"), 'w') as f:
for name in files:
if not name.endswith(".cvs"): continue
csvfile = os.path.join(path, name)
with open(csvfile, 'r') as file:
for url in file:
f.write(url + "\n")
# Функция для записи строк в один файл для каждой папки
#def writecsv(url, filename):
# with open(filename + '.csv', 'a') as f:
# f.write(url + "\n")
/bin/tar -c $HOME/www | s3cmd -c /root/.s3cfg put - s3://backup/$DUMPFILES.tar
/bin/tar -cz $HOME/www | s3cmd -c /root/.s3cfg put - s3://backup/$DUMPFILES.tar.gz
/bin/tar -cz $HOME/www | /usr/bin/split -d -b 3G - $DUMPFILES.tar. --filter 's3cmd -c /root/.s3cfg put - s3://backup/$FILE'
{
"aggs" : {
"host" : {
"terms" : {
"field" : "beat.hostname"
},
"aggs" : { "size":1,
"lane" : { "terms" : { "field" : "LaneIndic" }, "order" : { "@timestamp" : "desc" }}
}
}
}
}
sudo -s
apt-get update
apt-get install nginx php-fpm mysql