`
xfxlch
  • 浏览: 168873 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Hack 1. Define CD Base Directory Using CDPATH

阅读更多
CDPATH:是linux系统中预留的一个环境变量,该变量不可做其他使用。
CDPATH:改变目录路径变量,保留一系列由冒号隔开的路径名,用于cd命令。如果设置了CDPATH,cd一个目录时,首先查找CDPATH,如果CDPATH指明此目录,则此目录成为当前工作目录。例子如下:
[clu@portal.ny1 ~]$ pwd
/home/staff/clu
[clu@portal.ny1 ~]$ cd hello
-bash: cd: hello: No such file or directory
[clu@portal.ny1 ~]$ export CDPATH=/home/staff/clu/helloworld/
[clu@portal.ny1 ~]$ cd hello
/home/staff/clu/helloworld/hello
[clu@portal.ny1 hello]$ pwd
/home/staff/clu/helloworld/hello
[clu@portal.ny1 hello]$
分享到:
评论

相关推荐

    file.define.py

    file.define.py

    Linux-101-Hacks

    Define CDBase Directory Using CDPATH 在Linux中,`CDPATH`环境变量可以用来定义多个目录作为查找路径。当输入`cd`后跟目录名时,如果当前目录下不存在该目录,则会到`CDPATH`指定的路径中查找。这使得用户能够在...

    Lesson-5-master.zip

    1. Explain the primary steps of the BDS Phase 2. Define BDS’s goals 3. Identify BDS’ functions and components 4. Define global defined variables 5. Identify a UEFI device path 6. Search for handles ...

    Linux101 Hacks 2rd

    Define CDBase Directory Using CDPATH** 在Linux中,`CDPATH`环境变量可以定义多个目录作为`cd`命令的搜索路径。当输入一个不存在于当前目录的目录名时,`cd`命令会依次在`CDPATH`中列出的目录下查找该目录。 **...

    C#对接阿里云物联网平台示例源码(NetGadgeteer 温度、湿度、LED).rar

    //#define TLS_DirectConnection using System; using Microsoft.SPOT; using uPLibrary.Networking.M2Mqtt; using uPLibrary.Networking.M2Mqtt.Exceptions; using uPLibrary.Networking.M2Mqtt.Messages; using ...

    Cannot find AVD system path. Please define ANDROID_SDK_ROOT 这个问题不一定出在路径配置上

    Cannot find AVD system path. Please define ANDROID_SDK_ROOT 我下面说的解决方式仅限于极其小众的道友。 老婆作为刚入门的移动端开发的萌新,经常会有问题问我。就比如昨天她查遍教程也没解决这个报错,而我已经2...

    AS神奇的报错:Cannot find AVD system path. Please define ANDROID_SDK_ROOT

    报错1:Cannot find AVD system path. Please define ANDROID_SDK_ROOT  报错2:android-studio Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value 这台电脑上之前运行 Android Studio

    Create a package Vehicles (a sub-directory under the working directory) that holds the

    Define an abstract class Vehicle in the file Vehicle.java, add data members that can hold the following information: Vehicle type (Car, Bus, Truck or Motor), Registration number (e.g. “ABC123”), ...

    axy-define-asm:装配 axy.define 项目

    装配 axy.define 项目 见 。 安装 npm install axy-define-asm 命令行实用程序 axy-define-asm 。 位于目录bin 。 例子: axy-define-asm --source=js --outDir=outJS 没有参数,只有选项: --addExt=ext Add ...

    tensorflow 使用flags定义命令行参数的方法

    tf.app.flags.DEFINE_string('str_name', 'def_v_1',descrip1) tf.app.flags.DEFINE_integer('int_name', 10,descript2) tf.app.flags.DEFINE_boolean('bool_name', False, descript3) FLAGS = tf.app.flags.FLAG

    Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT

    Emulator: Process finished with exit code 1 Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT Android Studio 真是废柴!Google,Baidu 查了半天,无论 StackOverflow 还是 CSDN ...

    #define——用法大全

    #define MACRO(arg1, arg2) do { \ /* declarations */ \ stmt1; \ stmt2; \ /* ... */ \ } while(0) /* (no trailing ; ) */ ``` 这些定义可以用于生成多行代码。 ### 5. 条件编译 define 的一个重要功能是...

    Lesson-4-master.zip

    1. Define Firmware Storage, Firmware Files, Firmware File Systems, and Firmware Volumes and explain their hierarchical relationship 2. Define Terse Image 3. Explain why using a Terse Image is more ...

    微信小程序require 引用 BASE64.JS 失败问题的分析解决

    有朋友问, 微信小程序require ('base64.js')文件时,会失败,,, # 分析 事实上,微信小程序require很多JS模块都有不兼容现象。。。先从base64.js这个模块入手吧。 调试出错点: ~~~~ (function(global) {  'use ...

    136.#define 定义常量.pdf

    136.#define 定义常量

    137.#define 定义宏.pdf

    137.#define 定义宏

    Linux.101.Hacks

    **Hack 1: Use CDPATH to Define the Base Directory for cd Command** 在Linux中,`cd` 命令用于切换当前工作目录。使用环境变量 `CDPATH` 可以为 `cd` 命令定义一个或多个基础目录路径。当用户输入一个不包含斜杠...

    简单实现贪吃蛇游戏源代码

    #define LEN 1 #define SPEED1 50 #define SPEED2 100 #define SPEED3 200 #define FOOD1_S1 5 #define FOOD1_S2 10 #define FOOD1_S3 15 #define FOOD2_S1 10 #define FOOD2_S2 20 #define FOOD2_S3 30 void ...

    gulp-sofa-define-annotation:sofa.define批注Gulp插件

    sofa.define批注Gulp插件 用法 如果仅使用带有构造函数的单个类编写ES6代码,这将自动尝试查找类名称和参数。 // @SofaWrapper 否则,可以使用此语法创建包装器 // @SofaWrapper: NAME(param1, param2, ...)

Global site tag (gtag.js) - Google Analytics