linux 命令小结

Usage:
pip <command> [options]

<command>表明必须有这个参数,下面有具体的command, 而[options]表明这个是可选的。

-h --help 表明使用这两个命令都可以,如果是-h就是简写,如果是--help就是全称

-V经常用大写表示版本,因为经常会和其他V开头的重复

Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.

....

-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging
levels).
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
...

1、rm -r(f) file -r表明是reduce,递归删除,就是将文件夹和文件夹内的文件都删除,删除文件夹必须带上这个参数

-f 表示force 强制删除

cp 也是,比如加-r 才可以复制文件夹

2、linux 不同颜色代表不同文件

  • 蓝色:目录

  • 绿色:可执行文件

  • 红色:压缩文件

  • 浅蓝色:链接文件

  • 白色:普通文件

  • 黄色:设备文件

3、管道命令 | xargs 和 | grep

如果一条命令无法满足需求,我们需要续接一条命令继续进行处理,则使用管道命令

比如 find /usr -type f -name "siege.log" | xargs rm  就是找到所有siege.log的文件,并且删除

find /usr -type f | grep -w "siege.log" | xargs rm  -w表示全词匹配

4、查看某个命令的位置

比如which ps     得到/bin/ps

which python3.5 得到/usr/bin/python3.5

5、ps (process)

ps aux是全部进程(BSD 风格)

和ps -ef 是两种风格而已

6、linux跟随光标复制

在开头安v,进入visual模式,然后移动光标,按y复制,最后在要复制的光标处,按p

7、强制保存和强制退出只要加!就可以

:wq!   :q!

原文地址:https://www.cnblogs.com/yjybupt/p/12605318.html