0
1

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.

Command lineの基本

0
Last updated at Posted at 2021-06-29
terminal
# ファイルの作成
∼$ touch ファイル名

# ファイルの中身を確認する(conCATenate)
∼$ cat ファイル名

# ディレクトリを作成する(make directory)
∼$ mkdir ファイル名

# ディレクトリを移動する(change directory)
∼$ cd ディレクトリ名
# 一つ親のディレクトリに移動する
∼$ cd ..
# ホームディレクトリに移動する
∼$ cd

# カレントディレクトリを表示する(print working directory)
∼$ pwd
# *ルートからカレントディレクトリまでの階層が表示される

# ディレクトリの中身を表示する(list)
∼$ ls
# *一つ子の階層だけ

# ファイルを移動させる(move)
∼$ mv 移動させたいファイル名 移動先のディレクトリ名
# ファイル名を変更する
∼$ mv 現在のファイル名 新しいファイル名
# ディレクトリ名を変更する
∼$ mv 現在のディレクトリ名 新しいディレクトリ名

# ファイルのコピー(copy)
∼$ cp コピーするファイル名 新しいファイル名
# ディレクトリごとコピーする
∼$ cp -r コピーするディレクトリ名 新しいディレクトリ名

# ファイルの削除(remove)
∼$ rm 削除するファイル名
# ディレクトリごと削除する
∼$ rm -r ディレクトリ名

*補完機能、Tabキーを押すことで残りのファイル名を補完してくれる
*↑で入力したコマンドを選択できる
*control + c で終了
*困った時は[exit]と入力し、[enter]キーを押す

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?