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. celery 动态配置定时任务

    How to dynamically add or remove tasks to celerybeat? · Issue #3493 · celery/celery https://github.c ...

  2. .Net 5 C# 泛型(Generics)

    这里有个目录 什么是泛型? 后记 什么是泛型? 我们试试实现这个需求,给一个对象,然后返回 另一个同样的对象,先不管这个实用性,我们实现看看 首先是int型 private int Get(int a ...

  3. poj 2112 最优挤奶方案

    Optimal Milking Time Limit: 2000MS   Memory Limit: 30000K Total Submissions: 16550   Accepted: 5945 ...

  4. MSSQL 注入笔记

    前置知识: 登录名:登录sql server服务器的用户,而不是操作"数据库用户名". 固定服务器角色:就是上面登录名所属的权限组.其中重要的就是"sysadmin&qu ...

  5. 玩遍博客网站,我整理了 Hexo 及其流行的风格主题

    搭建博客网站是个人进入互联网世界的最常见方式之一.伴随着网站技术的发展,如何搭建博客网站已经变得非常容易了.当然,你可以选择诸如 新浪博客.CSDN.博客园 之类的大型网站,快速创建依赖于大平台的个人 ...

  6. 项目管理/Bug管理/问题管理—Phabricator

    项目管理/Bug管理/问题管理-Phabricator 1.项目管理/Bug管理/问题管理工具 2.Phabricator 3.Docker 方式安装Phabricator 3.1Docker方式安装 ...

  7. Postman 的 Post 请求方式的四种类型的数据

    Postman 的 Post 请求方式的四种类型的数据 1. form-data 2. x-www-form-urlencoded 3. raw 4. binary 1. form-data 就是 H ...

  8. mysql修改最大连接数

    root@localhost ~]# nano /etc/my.cnf编辑my.cnf在[mysqld]中加入:set-variable=max_connections=1000 更改 MySQL 在 ...

  9. /etc/fstab和/etc/mtab的区别

    etc/fstab文件的作用         记录了计算机上硬盘分区的相关信息,启动 Linux 的时候,检查分区的 fsck 命令,和挂载分区的 mount 命令,都需要 fstab 中的信息,来正 ...

  10. 从官方文档中探索MySQL分页的几种方式及分页优化

    概览 相比于Oracle,SQL Server 等数据库,MySQL分页的方式简单得多了,官方自带了分页语法 limit 语句: select * from test_t LIMIT {[offset ...