Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

linux command to get number of lines in a file

wc -l <filename>
# output = <number of lines> <filename>
# to omit the file name in output
wc -l < <filename>
# output = <number of lines>
Comment

linux count number of lines in all files

# count total line numbers of multiple files
find ./ -type f -exec wc -l {} ; | awk '{total += $1} END{print total}'
Comment

PREVIOUS NEXT
Code Example
Shell :: install wsl2 windows 10 pro 
Shell :: how to install wsl 2 in windows 10 
Shell :: zip folder linux 
Shell :: push to specific remote branch 
Shell :: git remove folder from cache 
Shell :: arch pacman remove 
Shell :: bash "set -e" 
Shell :: get users linux 
Shell :: pip install in jupyter notebook 
Shell :: bash split string into variables 
Shell :: remove folder and all subfolders in ubuntu 
Shell :: composer upgrade to 2 
Shell :: node js 16 install ubuntu 20.04 
Shell :: list only directories in linux 
Shell :: Reset a remote branch to previous commit 
Shell :: linux custom command 
Shell :: grant all the permission to the user ubuntu 
Shell :: how do i make a gif from youtube 
Shell :: symfony install doctrine 
Shell :: how to push a project to github 
Shell :: docker pack image to file 
Shell :: docker install linux mint 
Shell :: git flow hotfix 
Shell :: install samba server ubuntu 22.04 
Shell :: chmod x command 
Shell :: push to git with token 
Shell :: what is difference between npm install and npm install save --dev 
Shell :: windows how to install and use RSAT tools 
Shell :: setup ftp server linux 
Shell :: how to print substring in bash script 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =