In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the function of Linux basic command cat". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "the function of Linux basic command cat".
Cat
Connect a text file or standard input and output the results to a standard output device.
The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.
1. Grammar
Cat [options] file
Cat file1 file2 > file3
2. List of options
Option
Description
-- help
Show help documentation
-- version
Show command version
-A |-- show-all
Show all, equivalent to-vET
-b |-- number-nonblank
All outputs show line numbers, except for blank lines
-e
Equivalent to-vE
-E |-- show-ends
Output $at the end of each line
-n |-- number
Show line number
-s |-- squeeze
Merge consecutive blank lines into one line
-T
Display tab as ^ I
-t
Equivalent-vT
-v |-- show-nonprinting
Except for LDF and RAB, all controllers are displayed in "^" and "M -" modes.
3. Examples
1) output the contents of the file with line number
[root@192 weijie] # cat-b 1.c
1 2.c
2 3.c
2) merge two files into the third
[root@192 weijie] # cat 1.c 2.c
2.c
3.c
one hundred and twenty three
three hundred and forty five
[root@192 weijie] # cat 1.c 2.c > 3.c
[root@192 weijie] # cat 3.c
2.c
3.c
one hundred and twenty three
three hundred and forty five
At this point, I believe you have a deeper understanding of "the role of the Linux basic command cat". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.