リナックス linux 入門 初心者 コマンド

リナックス  linux  コマンド の情報満載です。 探しているlinux リナックス  コマンド はこちらです。


リナックス linux コマンド wc 使い方 使用方法 例

指定されたファイルを読み込み、

出力情報として、バイト数、単語数、行数(改行文字の個数)などがある。

複数のファイル名を指定した場合、各ファイルの情報と合計が表示される。

   wc -l <ファイル名> 行数を表示
   wc -c <ファイル名> バイト数を表示
   wc -m <ファイル名> 文字数を表示
   wc -L <ファイル名> 最長行を表示
   wc -w <ファイル名> 単語数を表示

ubuntu にて$ man wc 実行結果------------------------------------------------------------------------------------------

DESCRIPTION
       Print newline, word, and byte counts for each FILE, and a total line if more than
       one FILE is specified.  With no FILE, or when FILE is -, read standard input.

       -c, --bytes
              print the byte counts

       -m, --chars
              print the character counts

       -l, --lines
              print the newline counts

       --files0-from=F
              read input from the files specified by NUL-terminated names in file F

       -L, --max-line-length
              print the length of the longest line

       -w, --words
              print the word counts

       --help display this help and exit

       --version
              output version information and exit


ubuntu にて$ man wc 実行結果------------------------------------------------------------------------------------------

以下、wc実行例

$ cat 22222
1234567890

$ wc -c 22222
11 22222


$ wc -m 22222
11 22222

$ wc -l 22222
1 22222

$ wc -L 22222
10 22222

$ wc -w 22222
1 22222

$ wc --help
Usage: wc [OPTION]... [FILE]...
  or:  wc [OPTION]... --files0-from=F
Print newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified.  With no FILE, or when FILE is -,
read standard input.
  -c, --bytes            print the byte counts
  -m, --chars            print the character counts
  -l, --lines            print the newline counts
      --files0-from=F    read input from the files specified by
                           NUL-terminated names in file F
  -L, --max-line-length  print the length of the longest line
  -w, --words            print the word counts
      --help     この使い方を表示して終了
      --version  バージョン情報を表示して終了

バグを発見したら <bug-coreutils@gnu.org> 宛に報告して下さい.


$ wc --version
wc (GNU coreutils) 6.10
Copyright c 2008 Free Software Foundation, Inc.
Licence GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin and David MacKenzie.


「この記事は役に立ちました。」という場合には
ブログランキングボタンをクリックしていただけると大変、助かります。

ブログランキング

blogram投票ボタン


トラックバック(0)

このブログ記事を参照しているブログ一覧: リナックス linux コマンド wc 使い方 使用方法 例

このブログ記事に対するトラックバックURL: http://websky21.com/MT/mt-tb.cgi/300

Linuxコマンド一覧

ブックマークに追加

RSSフィード登録

ボタン をクリックするだけで RSSフィードを登録できます。 非常に便利で簡単に登録できてオススメです!

ATOM RSS

Bloglinesで閲読登録

ADD TO Hatena::RSS

Subscribe with livedoor Reader

Add to Google

goo RSSリーダーに追加

My Yahoo!に追加

フィードメーター - リナックス linux 入門   初心者 コマンド

リナックス 掲示板


2010年10月

          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
  RANKING⇒ banner_14.gif

RANKING⇒
RANKING⇒ blogram投票ボタン