linux 练习

ps  -ef | grep redis

whereis redis

redis

nohup redis-server

top:退出ctrl+c

history |grep redis

restart

telnet

tail -f log.log

pstree

who:可以查看从哪个机器登录过这个服务器,可以看到这个这个机器IP

date: date --date '11:11:12'修改时间

exit :退出shell

jobs:

logname:显示当前登录用户名

logout:  登出

last:列出登录服务器的用户

pts:你电脑打开的终端个数

nice:优先级设置例如:nice -n -20 vi,数字越小权限越大

reboot:重启机器

clear:清楚屏幕

diff:比较文件   例如 diff a.txt b.txt  -y -W 50:a, b两个文件同行显示比较,行宽设置为50

find ,whereis :   查找文件  例如:find -name  log

less ,more,cat:显示文件内容:

                          显示所有内容: cat test.log;

                           从第三行显示:more +3 test.log;

                           从文件中查找第一个出现"liu"字符串的行,并从该处前两行开始显示输出:more +/liu test.log

MV:更改文件名 mv aaa bbb

         mv info/ logs 将info 目录移到logs 目录

grep : grep test *file

vim:编辑文档的时候,在非编辑模式下使用shift +G到文件结尾,再输入i 就可以从文尾进行编辑

猜你喜欢

转载自blog.csdn.net/woshisiyecao/article/details/83003284