In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "the usage of the Linux basic command bzmore". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Bzmore
Extract bzip compressed files to standard output, and you can also display normal files to standard output. This instruction can be displayed on a split screen without deleting the compressed package. Bzmore is a filter that allows you to check compressed or plain text files at one time on a softcopy terminal. Bzmore can handle files compressed with bzip2 or uncompressed files. If the file does not exist, bzmore looks for the file with the same name and adds the .bz2 suffix. Bzmore usually pauses after each screen, printing-more-at the bottom of the screen. If the user then types enter, an additional line is displayed. If the user clicks a space, another screen is displayed. Other possibilities will be listed later.
The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.
1. Grammar
Bzmore file
2. List of options
Bzmore looks in the file "/ etc/Tercap" to determine the terminal characteristics and to determine the default window size. On terminals that can display 24 lines, the default window size is 22 lines. Other sequences that you might type when bzmore is paused and their effects are as follows (I is an optional integer parameter, default is 1):
Command
Description
I
Show more I lines (or another screen, if no parameters are given)
Ctrl+D
Show 11 more lines ("scroll"). If I is given, the scroll size is set to I.
D
Same as above
Iz
Same as typing a space, but if there is an I, it becomes the new window size. Notice that the window size reverts to the default value at the end of the current file.
Is
Skip line I and print out the full screen
If
Skip the I screen and print a whole line of screen
Q | Q
Stop reading the current file; continue to the next file (if any)
E | Q
When you output the prompt-- More-- (Next file: file), this command causes bzmore to exit.
S
When you output the prompt-- More-- (Next file: file), this command causes bzmore to skip the next file and continue
=
Show the current line number
I/expr
Search for the I occurrence of the regular expression expr. If the pattern is not found, bzmore continues to the next file, if any. Otherwise, a screen is displayed, starting two lines before finding the location of the expression. The user's erase and delete characters can be used to edit regular expressions. Erasing the first column cancels the search command.
In
The I occurrence of the last regular expression entered by the search
! Command
Use the command to wake up shell. Character'!' In commands, replace with the previous shell command. Sequence "\!" Change it to "!"
: Q |: Q
Stop reading the current file; go to the next file (if any) (same as Q or Q).
.
Repeat the previous command
These commands take effect immediately, that is, there is no need to type enter. Before giving the time of the command character itself, the user can click the line termination character to cancel the numeric parameter being formed. In addition, the user can click the erase character to redisplay-more messages.
At any time, when the output is sent to the terminal, the user can press the exit key (usually Control-\). Bzmore stops sending the output and displays the usual "--More--" prompt. The user can then enter one of the above commands in a normal manner. Unfortunately, when you do this, you lose some output, because when the exit signal occurs, any characters waiting in the terminal output queue are refreshed.
The program sets the terminal to noecho mode so that the output can be continuous. Therefore, what you type will not be displayed on your terminal, except for'/ 'and'!' Orders.
If the standard output is not teletype, then bzmore, like bzcat, prints a header before each file.
3. Examples
1) decompress the bz2 file
[root@localhost weijie] # bzmore 2.c.bz2 / / extract the content to standard output without deleting the compressed package
-> 2.c.bz2 1.c
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.