How to check how many lines a file has in Linux

青灯夜游
Release: 2021-11-22 17:58:30
Original
34444 people have browsed it

Linux method to check how many lines a file has: 1. Log in to the Linux system and right-click on a blank space on the system desktop; 2. In the pop-up drop-down option, click the "Open Terminal" option; 3. In the opened terminal, execute the "wc -l filename" command to view it.

How to check how many lines a file has in Linux

#The operating environment of this tutorial: Red Hat Enterprise Linux 6.1 system, Dell G3 computer.

How to check how many lines a file has in Linux

1. Log in to the Linux system and right-click on a blank space on the Linux desktop.

How to check how many lines a file has in Linux

2. In the pop-up drop-down option, click to open the terminal.

How to check how many lines a file has in Linux

How to check how many lines a file has in Linux

3. Execute the following command in the terminal to view the number of lines in the file.

wc -l filename
Copy after login

How to check how many lines a file has in Linux

Description:

The Linux wc command is used to calculate the word count.

  • wc -l filename is to check how many lines there are in the file.

  • #wc -w filename See how many words there are in the file.

  • wc -L filename How many words are there in the longest line in the file.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to check how many lines a file has in Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template