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. 使用“2”个参数调用“SetData”时发生异常:“程序集“

    使用"2"个参数调用"SetData"时发生异常:"程序集"Microsoft.VisualStudio.ProjectSystem.VS. ...

  2. CF486B

    扯在前面 本人找规律找了很长时间,然后发现找到规律之后其实是lj题,于是五分钟敲完代码,然后WA了两发 正文 题意: A, B 都是 n*m 的 01 矩阵,已知 B 矩阵是由A矩阵以一种规则生成 B ...

  3. BootstrapValidator验证规则、BootStrap表格:列参数

    BootstrapValidator验证规则 需引用组件 <script src="~/Scripts/jquery-1.10.2.js"></script> ...

  4. 最短路-Bellmm-ford算法

    Bellmm-ford算法 解决什么样的问题 有边数限制的最短路,存在负权边,负环 概念 通俗的来讲就是:假设 1 号点到 n 号点是可达的,每一个点同时向指向的方向出发,更新相邻的点的最短距离,通过 ...

  5. 7.DHCP的相关命令

    1.Get-DhcpServerv4Scope :查看所有作用域状态 PS C:\Users\xinghen> Get-DhcpServerv4Scope ScopeId SubnetMask ...

  6. vuex-pathify 一个基于vuex进行封装的 vuex助手语法插件

    首先介绍一下此插件 我们的目标是什么:干死vuex 我来当皇上!(开个玩笑,pathify的是为了简化vuex的开发体验) 插件作者 davestewart github仓库地址 官方网站,英文 说一 ...

  7. [CF套题] CF-1201

    CF-1201 传送门 # = * A 500 B 1000 C 1500 D 2000 E1 2000 E2 1000 1 (2217) 1672 482 00:09 400 01:40 790 0 ...

  8. 牛客网暑期ACM多校训练营(第二场)message

    传送门:https://ac.nowcoder.com/acm/problem/16631 题意 对于直线y=ax+b,给出n个的a[i]和b[i].m次询问,每次询问给出直线y=cx+d的c[i]和 ...

  9. 【noi 2.6_9272】偶数个数字3(DP)

    题意:问所有的N位数中,有多少个有偶数个数字3的数. 解法:f[i][j]表示i位数中含数字3的个数模2为j的个数.于是分第i位填3还是不填3讨论. 小tip:要模12345:for循环新定义了一个变 ...

  10. 【noi 2.6_8786】方格取数(DP)

    题意:N*N的方格图每格有一个数值,要求从左上角每步往右或往下走到右下角,问走2次的最大和. 解法:走一次的很好想,而走2次,不可误以为先找到最大和的路,再找剩下的最大和的路就是正解.而应该认清动态规 ...