常用命令
- ubuntu编译c++:
g++ -std=gnu++11 main.cpp -o main -lpthread
- 后台
nohup
- 查找
ps -ef|grep <command name>
- 杀死进程 kill -9
pid
- 给脚本文件运行权限
chmod 755 ./文件 名
- 清空废纸篓
sudo rm -rf ~/.Trash/
- 显示Mac隐藏文件的命令:
defaults write com.apple.finder AppleShowAllFiles YES
- 隐藏Mac隐藏文件的命令:
defaults write com.apple.finder AppleShowAllFiles NO
- 重启
shutdown -r now
- 端口占用:
lsof -i:9000