Liux部署总结(1)

  1. 解决tail命令提示“tail: inotify 资源耗尽,无法使用 inotify 机制,回归为 polling 机制”
> sysctl fs.inotify > echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf > sudo sysctl -p

  1. Linux scp命令
# 从本地复制到远程: > scp local_file remote_username@remote_ip:remote_folder #或者 > scp local_file remote_username@remote_ip:remote_file # 或者 > scp local_file remote_ip:remote_folder # 或者 > scp local_file remote_ip:remote_file # 拷贝本地文件夹 > scp -r local_file remote_ip:remote_file

  1. Linux系统里统计文件夹下的文件个数
# 统计当前目录下文件的个数(不包括目录) > ls -l | grep "^-" | wc -l # 统计当前目录下文件的个数(包括子目录) > ls -lR| grep "^-" | wc -l # 查看某目录下文件夹(目录)的个数(包括子目录) > ls -lR | grep "^d" | wc -l

  1. curl 的用法指南
> curl https://www.example.com # -d参数用于发送 POST 请求的数据体。 > curl -d'login=emma&password=123'-X POST https://google.com/login > curl -d 'login=emma' -d 'password=123' -X POSThttps://google.com/login

    推荐阅读