From 4d5756fd2b55e610f966fc6c559870607e11ddb6 Mon Sep 17 00:00:00 2001 From: Abhishek Yadav <115299126+yadav-7abhishek@users.noreply.github.com> Date: Thu, 27 Mar 2025 03:49:14 +0530 Subject: [PATCH] provided answer for count of number of lines and words in a file (#10558) --- topics/linux/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/topics/linux/README.md b/topics/linux/README.md index ebde22e..91696aa 100644 --- a/topics/linux/README.md +++ b/topics/linux/README.md @@ -2249,6 +2249,14 @@ $OLDPWD
How to count the number of lines in a file? What about words?
+ +For these we can use `wc` command. + +1. To count the number of lines in file +```wc -l``` + +2. To count the number of words in file +```wc -w```