美文网首页
有关终端常用命令

有关终端常用命令

作者: loongod | 来源:发表于2019-03-26 11:10 被阅读0次

1. 默认选项

mac 或者 linux 系统中,出现这样的选项,默认选项一般会是大写,如上 (Y/n) 就表示直接回车,将代表同意,如果你看到了(y/N) 这样的,就表示,默认选择的是否,这时候,就需要输入y 然后回车。当然,前提是你决定要这样做。

2. easy_install和pip的用法

easy_install的用法:

// 安装一个包
easy_install 包名
easy_install "包名 == 包的版本号"
// 升级一个包
easy_install -U "包名 >= 包的版本号"

pip的用法:

// 安装一个包
pip install 包名
pip install 包名 == 包的版本号 
// 升级一个包
pip install --upgrade 包名 >= 包的版本号
// 删除一个包
pip uninstall 包名

3. 升级Python中依赖库版本

Mac在/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python2.7路径下的依赖库,没法直接通过pip升级。

可以使用easy_install代替pip来升级

sudo easy_install "six == 1.9.0"
Searching for six==1.9.0
Reading https://pypi.python.org/simple/six/
Best match: six 1.9.0
Downloading https://files.pythonhosted.org/packages/16/64/1dc5e5976b17466fd7d712e59cbe9fb1e18bec153109e5ba3ed6c9102f1a/six-1.9.0.tar.gz#sha256=e24052411fc4fbd1f672635537c3fc2330d9481b18c0317695b46259512c91d5
Processing six-1.9.0.tar.gz
Writing /tmp/easy_install-LWq3LT/six-1.9.0/setup.cfg
Running six-1.9.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-LWq3LT/six-1.9.0/egg-dist-tmp-GN7Bha
no previously-included directories found matching 'documentation/_build'
zip_safe flag not set; analyzing archive contents...
six: module references __path__
creating /Library/Python/2.7/site-packages/six-1.9.0-py2.7.egg
Extracting six-1.9.0-py2.7.egg to /Library/Python/2.7/site-packages
Removing six 1.4.1 from easy-install.pth file
Adding six 1.9.0 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/six-1.9.0-py2.7.egg
Processing dependencies for six==1.9.0
Finished processing dependencies for six==1.9.0

4. 更新修改的环境变量

一般Mac上环境变量配置文件在用当前用户文件夹下 .bash_profile

// 在bash_profile文件的当前目录中 | 或者指定路径
source .bash_profile

5. vim显示行号

默认情况下,vim打开文件时不显示行号。

只需在打开的vim命令中输入 set nu 或者 set number 即可。这种设置在关闭当前打开的vim后既失效。

6. 修改Mac的默认终端

Mac系统默认使用dash作为终端,可以使用命令修改默认使用zsh:

chsh -s /bin/zsh

如果想修改回默认dash,同样使用chsh命令即可:

chsh -s /bin/bash

7. Jenkins定时构建语法

* * * * *
  • 第一个*表示分钟,取值0~59
  • 第二个*表示小时,取值0~23
  • 第三个*表示一个月的第几天,取值1~31
  • 第四个*表示第几月,取值1~12
  • 第五个*表示一周中的第几天,取值0~7,其中0和7代表的都是周日

常用定时构建举例:

// 每隔5分钟构建一次
H/5 * * * *
// 每隔2小时构建一次
H H/2 * * *
// 每天中午构建一次
0 12 * * *
// 每天下午构建一次
0 18 * * *

相关文章

  • 有关终端常用命令

    1. 默认选项 在 mac 或者 linux 系统中,出现这样的选项,默认选项一般会是大写,如上 (Y/n) 就表...

  • 树莓派常用命令

    Mac电脑使用终端进行管理 常用命令

  • 2018-07-17

    Mac终端自动补全及常用命令 1.终端自动补全的配置 打开终端,输入 : nano .inputrc 在文件里面写...

  • 常用命令集

    npm常用命令集 fis3常用命令集 git常用命令(在linux终端中输入命令) 远程仓库 babel常用命令集

  • Git 常用命令总结

    终端常用的命令: Git 常用命令: 在本地库 在远程库

  • 8.Flutter报错之Waiting for another

    问题:在终端使用flutter常用命令时提示: Waiting for another flutter comma...

  • Linux学习(二):Linux常用命令

    1、常用命令 终端命令格式command [-option] [parameter]中括号表示可选 ls ...

  • MAC终端常用命令

    MAC终端常用命令 clear 清空屏幕内容 percent work directory: 即 pwd 查看当前...

  • Mac brew安装nvm

    1、打开终端输入: 2、执行成功后,添加配置代码到zsh文件 3、添加成功后,重启终端 4、nvm常用命令

  • Linux-使用kafka自带程序操作topic

    前言 收集一些在终端下操作kafka的常用命令。 常用命令 切换到kafka目录进行操作 cd /opt/kafk...

网友评论

      本文标题:有关终端常用命令

      本文链接:https://www.haomeiwen.com/subject/oltslqtx.html