linux bash which

https://linuxize.com/post/linux-which-command/

Linux which command is used to identify the location of a given executable that is executed when you type the executable name (command) in the terminal prompt.

The command searches for the executable specified as an argument in the directories listed in the PATH environment variable

# which [OPTIONS] FILE_NAME...

$ which ping
/sbin/ping $which curl
/usr/bin/curl $ which netcat uptime
netcat not found
/usr/bin/uptime $ which -a touch
/usr/bin/touch
/usr/bin/touch

$ echo $PATH

➜  ~ echo $PATH
/Users/xgqfrms-mbp/.yarn/bin:
/Users/xgqfrms-mbp/.config/yarn/global/node_modules/.bin:
/Users/xgqfrms-mbp/.nvm/versions/node/v10.16.3/bin:
/Users/xgqfrms-mbp/.cargo/bin:/bin:/usr/bin:/usr/local/bin:
/Users/xgqfrms-mbp/anaconda3/bin:
/Users/xgqfrms-mbp/.cargo/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
/Users/xgqfrms-mbp/Documents/Flutter/flutter/bin:
/Users/xgqfrms-mbp/Documents/Flutter/flutter/bin
➜ ~

https://linuxize.com/post/how-to-set-and-list-environment-variables-in-linux/

https://linuxize.com/post/echo-command-in-linux-with-examples/

https://linuxize.com/post/linux-touch-command/

https://linuxize.com/post/how-to-create-symbolic-links-in-linux-using-the-ln-command/

refs



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


linux bash which的更多相关文章

  1. 转: windows 10使用原生linux bash命令行

    转: https://www.zybuluo.com/pandait/note/337430 windows 10使用原生linux bash命令行 linux bash windows-10 第一时 ...

  2. Linux Bash代码 利用for循环实现命令的多次执行

    Linux Bash代码 [yuanhao15@lu01 libsvm-rank-2.81]$ for ((i=0; i<=19; i++)) do ./svm-train -s 5 -c 10 ...

  3. linux BASH shell设置字体与背景颜色

    linux BASH shell下设置字体及背景颜色的方法. BASH shell下设置字体及背景颜色  echo -e "\e[31mtest\e[41m"  \e[30m 将字 ...

  4. Linux:-bash: ***: command not found

    Linux:-bash: ***: command not found,系统很多命令都用不了,均提示没有此命令. 突然之间linux很多命令都用不了,均提示没有此命令. 这应该是系统环境变量出现了问题 ...

  5. Linux Bash命令关于程序调试详解

    转载:http://os.51cto.com/art/201006/207230.htm 参考:<Linux shell 脚本攻略>Page22-23 Linux bash程序在程序员的使 ...

  6. 禁用Linux bash rm --force

    防止无意的Linux bash rm --force 二.禁用rm -rf 因为rm -rf 删除文件的时候,经常会不小心将系统文件或者多个有用的目录删除掉.有两种方法:1,每次删除都用-i(inte ...

  7. linux bash关闭标准输出1(exec 1<&-)后重新打开

    linux bash shell的再次学习. 文件描述符: stdin,stdout 和 stderr 的文件描述符分别是 0,1 和 2(一个文件描述符说白了就是文件系统为了跟踪这个打开的文件而分配 ...

  8. win10开启 linux Bash命令(win10内置了linux系统支持)

    win10开启 Ubuntu linux Bash命令(win10内置了linux系统支持) 第一步: 先在设置→更新和安全→针对开发人员中选择"开发人员模式",点击后会下载&qu ...

  9. 【Linux】linux bash shell之变量替换::=句法、=句法、:-句法、-句法、=?句法、?句法、:+句法、+句法

    linux bash shell之变量替换::=句法.=句法.:-句法.-句法.=?句法.?句法.:+句法.+句法   linux bash shell之变量替换::=句法.=句法.:-句法.-句法. ...

  10. Win10系统开启Linux Bash命令行

    Win10系统开启Linux Bash命令行 导读 在Build2016上微软为了拉拢开发者发了个大招,那就是Win10一周年更新集成原生Linux Bash命令行功能,这将允许开发者或用户在Wind ...

随机推荐

  1. hadoop 集群搭建 配置 spark yarn 对效率的提升永无止境 Hadoop Volume 配置

    [手动验证:任意2个节点间是否实现 双向 ssh免密登录] 弄懂通信原理和集群的容错性 任意2个节点间实现双向 ssh免密登录,默认在~目录下 [实现上步后,在其中任一节点安装\配置hadoop后,可 ...

  2. loj10003加工生产调度

    题目描述 某工厂收到了 n个产品的订单,这  个产品分别在 A.B 两个车间加工,并且必须先在 A 车间加工后才可以到 B 车间加工. 某个产品 i 在 A,B 两车间加工的时间分别为 A_i,B_i ...

  3. 关于MinGW64的调试

    学习的机房电脑能老了,都是xp系统.安装DEV C++后发现为MinGW64. 而我常用编译调试命令为: g++ -g *.cpp -o a gdb a 编译出的程序无法调试. 一直以为,根本就无法调 ...

  4. SpringMVC听课笔记(五:处理模型数据)

    1. Spring MVC 提供了以下几种途径输出数据模型 -- ModelAndView: 处理方法返回值类型为ModelAndView 时,方法体即可通过该对象添加模型数据 -- Map及Mode ...

  5. 在项目中如何自定义的Eslint配置

    一.设置js风格的缩进为4个空格 在你的前端项目中找到.eslintrc.js文件,如图 module.exports = { root: true, parserOptions: { parser: ...

  6. (十二)整合 Shiro 框架,实现用户权限管理

    整合 Shiro 框架,实现用户权限管理 1.Shiro简介 1.1 基础概念 1.2 核心角色 1.3 核心理念 2.SpringBoot整合Shiro 2.1 核心依赖 2.2 Shiro核心配置 ...

  7. RedisUtil,Redis工具类

    RedisUtil,Redis工具类 1.配置maven,增加依赖 2.配置工具类 1.配置maven,增加依赖 <dependency> <groupId>redis.cli ...

  8. Jenkins(6)测试报告邮件发送

    前言 前面已经实现在jenkins上展示html的测试报告,接下来只差最后一步,把报告发给你的领导,展示你的劳动成果了. 安装 Email Extension Plugin 插件 jenkins首页- ...

  9. Pytest(3)fixture的使用

    fixture的优势 Pytest的fixture相对于传统的xUnit的setup/teardown函数做了显著的改进: 命名方式灵活,不局限于 setup 和teardown 这几个命名 conf ...

  10. HDU - 2328 Corporate Identity(kmp+暴力)

    传送门:http://acm.hdu.edu.cn/showproblem.php?pid=2328 题意:多组输入,n==0结束.给出n个字符串,求最长公共子串,长度相等则求字典序最小. 题解:(居 ...