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?

【Linux】wcコマンド

Posted at

wcword count(ワードカウント) の略で、Linux/Unix 系のコマンドです。
ファイルや標準入力の 行数・単語数・バイト数 を数えるために使います。

基本構文

wc [オプション] ファイル名

ファイルを指定しない場合は 標準入力 から読み込みます(パイプと併用可)。

主なオプション

-l

行数を表示

【意味・由来】
lines → 行数を表示

-w

単語数を表示

【意味・由来】
words → 単語数を表示

-c

バイト数(文字数ではなくバイト数)を表示

【意味・由来】
bytes (characters) → バイト数を表示 (c は "characters" の略)

-m

文字数を表示(マルチバイト対応)

【意味・由来】
characters → 文字数を表示(マルチバイト対応)

-L

最長行の文字数を表示

【意味・由来】
Longest line → 最長行の文字数を表示

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?