wc

初級
1/5
user@linux:~/workspace$
wc file.txt

解説

  • 10: 行数
  • 62: 単語数
  • 462: バイト数
  • file.txt: ファイル名

オプション

-l行数のみ表示
-w単語数のみ表示
-cバイト数のみ表示
-m文字数のみ表示
1Hello, World!
2This is a sample text file for practicing Linux commands.
3You can use commands like cat, head, tail, and grep on this file.
4
5Line 5: Learning Linux commands through typing practice.
6Line 6: WebContainers make it possible to run commands in the browser.
7Line 7: Practice makes perfect!
8Line 8: Keep typing to improve your speed and accuracy.
9Line 9: Linux is widely used in servers and development environments.
10Line 10: Mastering the command line is a valuable skill.