0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

パス(path)を通す

0
Last updated at Posted at 2021-06-25

こんにちは。
「パス(path)を通す」について説明します。

  • まず、CUI1におけるコマンドの処理実行の基本形は下記の形です2
$ コマンドパス 処理対象ファイルパス
  • しかしこれを、下記のように動かすことができれば楽になります3
$ コマンド名 処理対象ファイルパス
  • これを実現するには、このコマンド名コマンドパスを正しく指すことが必要です:
    • コマンド名コマンドパスで表す基本形方式
      • 絶対もしくは相対パス4でコマンドパスを表します
    • コマンド名のみで表す方式
      • 事前にalilasコマンドで指定
        • 使用例:alias コマンド名='コマンドパス'
      • もしくは事前に「パス(path)を通す」必要があります
        • すなわちPATH環境変数を指定します(コマンドファイルを格納しているディレクトリパス(複数可)を設定)
          • この指定を表示させた例です:
$ echo $PATH
/Users/kkdd/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/sbin
  1. CUI とは、キャラクタベースユーザインタフェース (character-based user interface)、コンソールユーザインタフェース (console user interface) 、もしくはコマンドラインインタフェース (command line interface) です。

  2. パス(path)とは、ファイル(およびコマンドファイル)のディレクトリ内における位置のことです。

  3. なぜならば、「コマンドのパス」(主にフルパス)を意識する必要が低減されるためです。

  4. 相対バス指定表現を./../~/で始めます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?