当前位置:网站首页>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
边栏推荐
- SAP ui5 application development tutorial 32 - how to create a custom SAP ui5 control
- PIP connects to Tsinghua source by default
- JS to realize the encapsulation of the function of obtaining the mouse click position
- What happens when redis runs out of memory
- 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
- Code learning-cvpr2020 unsupervised domain adaptive semantic segmentation: intra advance
- Pat 1045 quick sort
- Mirror image of binary tree
- 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
- SAP ui5 beginner tutorial 25 - using proxy server to solve the cross domain problem of SAP ui5 application accessing remote OData service trial version
猜你喜欢

50 days countdown! Are you ready for the Landbridge cup provincial tournament?

Multithreading and thread pool
SAP ui5 tutorial for beginners part XXVI - detailed steps for using OData service with mock server trial version

Soft exam information system project manager_ Management Science (Operations Research) 2--- senior information system project manager of soft test 034

【LeetCode】40. Combined summation II (2 strokes of wrong questions)

MySQL uses the where condition to find strange results: solve

MySQL tuning --01--- optimization steps and system performance parameters
Linus' speech recordings, which were lost in 1994, were made public
SAP ui5 date type sap ui. model. type. Analysis of date parsing format
SAP Fiori tools and corresponding cli (command line interface)
随机推荐
Use of arrays tool class
What happens when redis runs out of memory
MySQL transaction learning notes (I) first encounter
How SAP ui5 device type detection device API works
Depth of binary tree
Folding mobile phones are expected to explode, or help Samsung compete with apple and Chinese mobile phones
Semantic segmentation fcns in the wild: pixel level adaptive and constraint based adaptation
Deep learning non local neural networks
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.
Simple student management system
Use of MySQL variables
Day21 JMeter usage basis
Use generator-easy-ui5 to quickly create the engineering structure of SAP ui5 applications
Guava common collection tool classes
[untitled]
Day18 (set, generic, hash table, tree, stack and queue, graph, array and linked list)
Get the first letter of Chinese phonetic alphabet in Excel and capitalize it
Jenkins installation and configuration
D compile time reflection
Introduction to MySQL test run test framework