echo $SHELL($SHELL)
echo $HISTSIZE( $HISTSIZE)
tail -f test.log | grep -B 10 -A 10 'exception'
less log.txt 分屏显示
cat test.log | less
mac: clear memory :command + k
unix:reset
ps aux
ps aux | grep ruby
twistd -noy app.tac
ctrl+z :shell程序到后台,fg切换到前台
or kill %1 ([1]+ Stopped)
后台运行:twistd -noy app.tac &
切换到前台,执行wistd -noy app.tac
kill -l
kill -9/KILL
ip -a(no mac)
netstat -an | grep LISTEN
dig google.com 查看IP地址
curl(command url):
curl ifconfig.me
curl -i baidu.com :显示头部信息
curl -v baidu.com :显示详细信息
w/uptime:查看运行几天
watch -n 1 "date":查看日期
du deep/:查看文件大小
du -h test.log
df -h: 查看空间
sudo chown roc app.tac :改变文件所属的拥有者
sudo chown roc: staff app.tac :改变文件拥有的组
把keep目录下所有的用户的拥有者都修改为mysql
sudo chown -R mysql keep/
chmod u=rwx,g=rw,o=x a.txt
chmod u-x,g=rw,o=x a.txt :追加或减少可执行权限
chmod -R u-x,g=rw,o=x keep/ :把keep目录下所有的用户的拥有者都修改为mysql
echo $PATH
> -/.profile 清空 profile 文件
env:显示所有加载环境变量
网友评论