一些常用小技巧

1. 测试服务端口连通性

curl -i http://127.0.0.1:8099/staus/

2. 从服务器下载文件

import commands

wget_cmd = "wget --mirror -P /home/zz/ --limit-rate=80M ftp://" + file_path
# 或
gko3_cmd = "gko3 down -p " + /home/zz/+ " --enable-dynamic-hash-check \
    --source  gko3://" + file_path
status_output = commands.getstatusoutput(wget_cmd)
status = status_output[0]
if status != 0:
    print("download failed")

你可能感兴趣的:(linux,服务器,javascript,运维)