LoginSignup
0
0

More than 1 year has passed since last update.

【Linux】中級コマンド一覧

Last updated at Posted at 2022-06-27

初めに

前回は基本的なコマンドについて記事にしましたが今回は中級レベルのコマンドを記事にします。

コマンド

grep

ファイルまたは入力ストリームから、表現に一致する行を表示する。

/etc/password ファイルの中にある test というテキストを含む行を表示する。

grep test /etc/password

less

ファイルの内容が一度に一画面ずつ表示されます。

大量の出力するコマンドの出力を確認する場合にとても便利です。

less /usr/share/dict/words

また、greplessを組み合わせることをできます。

grep ie /usr/share/dict/words | less

pwd

カレント・ワーキング・ディレクトリの名前を出力をします。

$ pwd
/Users/test

diff

2つのテキストファイルの差分を知ることができます。

diff file1 file2

file

ファイル形式を表示します。

file file

find

dir内にあるfileを探すことができます。

find dir -name file -print
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