当前位置:网站首页>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
边栏推荐
- MySQL tuning -- 02 -- slow query log
- Common cluster deployment schemes in redis
- 手机开户一般哪个证券公司好?手机开户是安全么?
- 05 virtual machine stack
- Code learning-cvpr2020 unsupervised domain adaptive semantic segmentation: intra advance
- What changes have taken place in the project file after SAP ui5 tools ran the Fiori add deploy config command
- D compile time reflection
- Leetcode topic [array] -36- effective Sudoku
- MySQL operation JSON
- Jz-066- motion range of robot
猜你喜欢
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
How the sap ui5 framework performs single step debugging of batch requests
Soft exam information system project manager_ Management Science (Operations Research) 2--- senior information system project manager of soft test 034
Distributed solar photovoltaic inverter monitoring
Mirror image of binary tree
Only these four instructions are required to operate SQL data
SAP ui5 application development tutorial XXIX - Introduction to routing and navigation functions of SAP ui5 trial version
Multithreading and thread pool
MySQL tuning --01--- optimization steps and system performance parameters
Use of MySQL variables
随机推荐
SAP Fiori tools and corresponding cli (command line interface)
Semantic segmentation fcns in the wild: pixel level adaptive and constraint based adaptation
[OSPF routing calculation (class I LSA router, class II LSA network, and class III LSA sum net)] -20211228-30
Trouble of setting table property to null
JS implementation mouse can achieve the effect of left and right scrolling
Soft exam information system project manager_ Management Science (Operations Research) 2--- senior information system project manager of soft test 034
CSDN cerebral palsy bug has wasted nearly two hours of hard work
MySQL tuning -- 02 -- slow query log
Incorrect dependency of POM file
Day16 (regular expression, enumeration)
How do product managers get started? How do they learn when no one takes them?
What is the use of the subprocess module
Soft exam information system project manager_ Management Science (Operations Research) -- senior information system project manager of soft test 033
Use generator-easy-ui5 to quickly create the engineering structure of SAP ui5 applications
Guava new collection type
Depth of binary tree
Multithreading and thread pool
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
ArcGIS Engine + Visual Studio installation tutorial
Laravel8 fill data