Home>Article>Operation and Maintenance> What does centos7 cat command mean?
centos7 cat is a command used to connect files or standard input and print. Simply put, the cat command is used to view plain text files. Used in conjunction with redirection symbols, it can create files and merge files. .
The operating environment of this article: CentOS 7 system, DELL G3 computer
Centos 7 cat command
We use the man cat command. You can see that the cat command is used to connect files or standard input and print. Simply put, the cat command is used to view plain text files (usually For files with less content), used in conjunction with the redirection symbol, you can create and merge files.
We use the cat command to view the study.txt file
We use cat -n to open the study.txt file
You can see, In front of each line of text content, there will be numbers displayed. These numbers are the line numbers.
Use the cat command to create a file named test.txt
Enter cat > test.txt , then enter the text we want to enter. After entering, you can press ctrl C to exit
Use ls to check whether there is anything just created test.txt file.
You can see that the test.txt file has been created, and the content is exactly what we just entered.
Merge study.txt and test.txt into one file, the file name is file.txt
##Execute cat study.txt test.txt > file.txt
You can see that the content of file file.txt is study.txt test. txt content.
3. SummaryThe above is the basic usage of cat command that I have learned so far. As the learning progress progresses, I will also share more in-depth usage with you. Everyone, let’s encourage each other on the road of learning.
Recommended: "centos usage tutorial"
The above is the detailed content of What does centos7 cat command mean?. For more information, please follow other related articles on the PHP Chinese website!