LoginSignup
3
1

More than 5 years have passed since last update.

Unixコマンドライン

Last updated at Posted at 2017-08-26

主要なUnixコマンド

説明 コマンド コマンド例
ディレクトリ内容の表示 $ ls $ ls -l
ディレクトリの作成 $ mkdir <ディレクトリ名> $ mkdir workspace
ディレクトリの移動 $ cd <ディレクトリ名> $ cd workspace/
上のディレクトリに移動 $ cd .. $ cd ..
ホームディレクトリに移動 $ cd ~ $ cd ~
ホームディレクトリ直下のworkspaceに移動 $ cd ~/~.. $ cd ~/workspace/
ファイルの移動やリネーム(1) $ mv <移動元> <移動先> $ mv foo bar
ファイルの移動やリネーム(2) $mv <現在の名前> <変更後の名前> $ mv foo bar
ファイルのコピー $ cp <コピー元> <コピー先> $ cp foo bar
ファイルの削除 $ rm <ファイル名> $ rm foo
空のディレクトリの削除 $ rmdir <ディレクトリ名> $ rmdir workspace/
中身のあるディレクトリの削除 $ rm -rf <ディレクトリ名> $ rm -rf tmp/
ファイルの内容の結合と表示 $ cat <ファイル名> $ cat ~/.ssh/id_rsa.pub
ファイルの新規作成 $ touch <ファイル名> $ touch xxx
ファイルを新規作成して編集 $ vi <ファイル名> $ vi xxx

メモ的なもの(^ω^)

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