当前位置:网站首页>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
边栏推荐
- Interface learning
- D compile time reflection
- Data7202 statistical analysis
- Some common errors and solutions of using SAP ui5 to consume OData services
- What is hybrid web containers for SAP ui5
- HashSet implementation class
- Depth of binary tree
- Introduction to sap ui5 tools
- Lesson 8: FTP server setup and loading
- Soft exam information system project manager_ Management Science (Operations Research) -- senior information system project manager of soft test 033
猜你喜欢
Vscode voice notes to enrich information (Part 1)
SAP ui5 beginner tutorial No. 28 - Introduction to the integration test tool OPA for SAP ui5 applications

What happens when redis runs out of memory
Some common errors and solutions of using SAP ui5 to consume OData services

16 application problem solving

MySQL tuning -- 02 -- slow query log
Interviewer: what is an iterator? What is the relationship between async await and iterators?

CVPR2021-Semi-supervised Domain Adaptation based on Dual-level Domain Mixing for Semantic Segmentati
SAP ui5 application development tutorial 32 - how to create a custom SAP ui5 control

Interface learning
随机推荐
[JS basic review] scope, this, closure
[OSPF routing calculation (class I LSA router, class II LSA network, and class III LSA sum net)] -20211228-30
Day17 (set)
Lesson 9: workspace introduction
Monkey test of APP automation
Kyma application connectivity feature introduction
Invalid bound statement (not found)
Timed thread pool
Semantic segmentation cvpr2019-advance: advantageous enterprise minimization for domain adaptation in semantic segmentation
C switch nested syntax
Technology inventory: Technology Evolution and Future Trend Outlook of cloud native Middleware
Farewell to Lombok in 996
同花顺软件究竟是什么?网上开户安全么?
Go quiz: considerations for function naming return value from the go interview question (more than 80% of people answered wrong)
Try with resource close resource flow
"APEC industry +" biov Tech talks about the cross-border of Chinese biotechnology enterprises and "Pratt & Whitney Kangyu" | apec-hub public welfare
Technology Review: what is the evolution route of container technology? What imagination space is there in the future?
Interview experience - list of questions
2.20 learning content
Aiot project that is an introduction to the basics of the Internet of things and can be implemented in practice