1. MAKIZOU.COM
  2. Linuxコマンド・リファレンス

wc ファイルの行数、単語数、サイズを表示 – Linuxコマンド

add to hatenahatena.comment(0)add to del.icio.us(0)add to livedoor.clip(0)add to Yahoo!Bookmark(0)Total: 0

書式

wc [-clw] [FILE...]

説明

Word Count の略。

ファイル内の行数、単語数、バイト数を集計し左から表示します。
また、単語は空白で区切られたものを単語として扱います。

オプション

-c
バイト数のみを集計し表示します。
-l
行数のみ集計し表示します。
-w
単語数のみ集計し表示します。
FILE
集計するファイルを指定します。

サンプル

例1)hoge.txtファイルの行数、単語数、バイト数をそれぞれ表示。

$ wc hoge.txt ↵

289 1726 78251 hoge.txt
この記事は参考になりましたか?
1つ星2つ星3つ星4つ星5つ星
Loading ... Loading ...
日付2006年09月09日
カテゴリLinuxコマンド・リファレンス
ページビュー1,979PV
add to hatenahatena.comment(0)add to del.icio.us(0)add to livedoor.clip(0)add to Yahoo!Bookmark(0)Total: 0
トラックバック(0)
コメント(0)

トラックバック用URL

コメント

使用できるHTMLタグ
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt="">