In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today I'll show you what the cat command in the Linux command is for. The content of the article is good. Now I would like to share it with you. Friends who feel in need can understand it. I hope it will be helpful to you. Let's read it along with the editor's ideas.
The purpose of the cat command is to connect files or standard input and print. This command is often used to display the contents of a file, to connect several files to display, or to read and display the contents from standard input, and it is often used in conjunction with redirection symbols.
Use permissions for all users
Syntax format cat [- AbeEnstTuv] [--help] [--version] fileName parameter description:-n or-number: numbering all output lines starting with 1.
-b or-number-nonblank: similar to-n, except that blank lines are not numbered.
-s or-squeeze-blank: when you encounter more than two consecutive blank lines, replace them with blank lines on one line.
-v or-show-nonprinting: use ^ and M-symbols, except for LFD and TAB.
-E or-show-ends: displays $at the end of each line.
-T or-show-tabs: displays the TAB character as ^ I.
-A,-show-all: equivalent to-vET.
-e: equivalent to the "- vE" option
-t: equivalent to the "- vT" option
Example: enter the content of the textfile1 document with a line number into the textfile2 document:
Cat-n textfile1 > textfile2 appends the contents of the textfile1 and textfile2 documents to the textfile3 document after adding line numbers (no blank lines):
Cat-b textfile1 textfile2 > > textfile3 clear / etc/test.txt document contents:
Cat / dev/null > / etc/test.txtcat can also be used to make image files. For example, to create an image file of a floppy disk, put the floppy disk away and enter:
Cat / dev/fd0 > OUTFILE conversely, if you want to write image file to a floppy disk, type:
Cat IMG_FILE > / dev/fd0 Note:
\ 1. OUTFILE refers to the name of the output image file.
\ 2. IMG_FILE refers to the image file.
\ 3. If you write back to device from an image file, the device capacity needs to be the same.
\ 4. It is usually used to make a boot disk.
This is all about the use of the cat command in the Linux command, and more related to the use of the cat command in the Linux command. You can search the previous article or browse the following article to learn! I believe the editor will add more knowledge to you. I hope you can support it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.