当前位置:网站首页>Cat command – display the file contents on the terminal device
Cat command – display the file contents on the terminal device
2022-06-25 05:59:00 【ProYuan28】
Linux There are many commands in the system for viewing the contents of files , Each command has its own characteristics , Like this cat Commands are used to view plain text files with less content .cat This command is also easy to remember , because cat In English it is “ cat ” It means , Kitty is not to give you a petite 、 Lovely feeling ?
Be careful : When the file content is large , The text content will flash quickly on the screen ( Scroll ), Users often can't see the specific content displayed . Therefore, for long file contents, you can press Ctrl+S key , Stop rolling screen ; as well as Ctrl+Q Key to resume scrolling ; And press Ctrl+C( interrupt ) Key can terminate the execution of the command . Or for large files , Just use more Order it !
Grammar format :cat [ Parameters ] [ file ]
Common parameters :
| -n | Display row number ( Blank lines are also numbered ) |
| -s | Display row number ( Multiple blank lines count as one number ) |
| -b | Display row number ( Blank lines are not numbered ) |
| -E | Show... At the end of each line $ Symbol |
| -T | take TAB Characters appear as ^I Symbol |
| -v | Use ^ and M- quote , except LFD and TAB outside |
| -e | Equivalent to ”-vE” Combine |
| -t | Equivalent to ”-vT” Combine |
| -A | Equivalent to -vET Combine |
| --help | Display help information |
| --version | Display version information |
Reference examples
Check the contents of the file :
[[email protected] ~]# cat filename.txt
Check the contents of the file , And display the number of rows :
[[email protected] ~]# cat -n filename.txt
Check the contents of the file , And add the line number and output it to another file :
[[email protected] ~]# cat -n linuxcool.log > linuxprobe.log
Empty the contents of the file :
[[email protected] ~]# cat /dev/null > /root/filename.txt
Continuously write file contents , meet EOF End and save :
[[email protected] ~]# cat > filename.txt <<EOF > Hello, World > Linux! > EOF
Make a floppy disk device into a mirror file :
[[email protected] ~]# cat /dev/fd0 > fdisk.iso
边栏推荐
- Try with resource close resource flow
- SAP ui5 beginner tutorial No. 28 - Introduction to the integration test tool OPA for SAP ui5 applications
- How do product managers get started? How do they learn when no one takes them?
- The e-book "action guide for large organizations to further promote zero code application platform" was officially released!
- Noi Mathematics: Dirichlet convolution
- ThreadLocal
- ArcGIS Engine + Visual Studio installation tutorial
- Leetcode topic [array] -36- effective Sudoku
- SAP ui5 beginner tutorial 25 - using proxy server to solve the cross domain problem of SAP ui5 application accessing remote OData service trial version
- Introduction to MySQL test run test framework
猜你喜欢
Some common errors and solutions of using SAP ui5 to consume OData services
Learn the interface test, see it is very good, and make a note

Distributed solar photovoltaic inverter monitoring
[kicad image] download and installation

Semantic segmentation cvpr2019-advance: advantageous enterprise minimization for domain adaptation in semantic segmentation

MySQL tuning -- 02 -- slow query log
Part 34 of SAP ui5 application development tutorial - device adaptation of SAP ui5 application based on device type

I got to know data types and function variables for the first time. I learned data types and function variables together today and yesterday, so I saved them in the first issue to record.

16 application problem solving
Use generator-easy-ui5 to quickly create the engineering structure of SAP ui5 applications
随机推荐
Day22 send request and parameterization using JMeter
JMeter stress testing and agent recording
Add the author watermark plugin v1.4 update to the posts of elegant grass discuz plugin - some forums post errors and bugs have been fixed
Multithreading and thread pool
Lesson 8: FTP server setup and loading
Introduction to MySQL test run test framework
Vscode voice notes to enrich information (medium)
Kubevela v1.2 release: the graphical operation console velaux you want is finally here!
MySQL -- optimize query statements and use not in with cases
Mongodb basic concept learning - Documentation
Day21 performance test process
Pat 1045 quick sort
CVPR2021-Semi-supervised Domain Adaptation based on Dual-level Domain Mixing for Semantic Segmentati
Solve some prompt codes that pychar cannot recognize selenium
Introduction to sap ui5 tools
MySQL operation JSON
Feignclient reported an error npe:null
C switch nested syntax
Wireless industrial Internet of things data monitoring terminal
Click to send text messages without response is a common problem for many users in building the elegant grass Dragonfly Q system - solve the problem of clicking to send text messages without response