wcコマンドでファイルのバイト数をカウントする方法
wcコマンドでファイルのバイト数をカウントするには-cオプションを指定します。
オプションの説明
-c, --bytes print the byte counts
-cオプションを指定した場合
$ cat test.txt a $ wc -c test.txt 2 test.txt $ cat test2.txt abc $ wc -c test2.txt 4 test2.txt $ cat test3.txt a b c $ wc -c test3.txt 6 test3.txt $ cat test4.txt あいうえお $ wc -c test4.txt 16 test4.txt

Linux:wcコマンドでファイルの文字数をカウントする方法
wcコマンドでファイルの文字数をカウントする方法 wcコマンドでファイルの文字数をカウントするには-mオプションを指定します。 オプションの説明 -m, --chars print the character counts -mオプション...