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.

Linux 基本的なコマンド群

Posted at

ls

ファイルやディレクトリの参照

ls [オプション][ファイル]

-a 全て出力
-l long形式で出力
-t 最終更新時間によって、ソートして出力
-r 逆順にソートして出力

cp

ファイルのコピー

[オプション] コピー元 コピー先

-i 処理を行うときに確認する。
-r ディレクトリをコピーする。
-p 元のファイルの情報を保存する。

mv

ファイルの移動

mv 移動元ファイル 移動先ファイル

-i 処理するときに確認する
-f 強制的に処理実行

rm

削除

rm ファイル名

-i 処理するとき確認
-f 強制的に実行
-r ディレクトリを対象にする

pwd

現在のディレクトリの表示

pwd

cd

ディレクトリの変更

cd [ディレクトリ名]

mkdir

ディレクトリの作成

mkdir ディレクトリ名

-p 指定されたディレクトリの上位ディレクトリも作成する。

rmdir

ディレクトリの削除

rmdir ディレクトリ名

-p 指定した階層までのディレクトリを一括で削除

ディレクトリの種類

(.)

カレントディレクトリ、現在のディレクトリ

(..)

親ディレクトリ、1段層上のディレクトリのこと

(~)

ホームディレクトリ、ユーザの作業開始位置となるディレクトリ

(/)

ルートディレクトリ、ディレクトリ階層の最上位階層を示す

cat

ファイル内容の表示

cat ファイル名

-n 行番号を付加して表示する

find

ファイルの検索

find パス -name ファイル名

which

コマンドのパス表示

which コマンド名

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?