linux

command

创建文件

1
touch test.sh

清空文件内容命令

1
2
3
echo "" >log.log
# > 是重写,覆盖式
# >>是尾部追加

查看历史命令

1
2
history
history | grep telnet

服务开机启动

1
2
systemctl enable docker.service
systemctl start docker.service

查看进程

1
2
3
ps aux | grep php
# 关闭
ps aux | grep php | xargs kill -9

http

1
2
curl -H "Content-type: application/json" -X POST -d '{"param1":"xxx"}' http://test.api.com/post
curl --insecure -I -H "Content-type: application/json" -X DELETE http://test.api.com/delete/{id}

查看文件占用空间

1
du -h --max-depth=1
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×