Linux 终端命令之文件浏览(2) more

news/2025/3/31 20:21:31/

18647a9c4d804f0eacedc1984bee2940.png

Linux 文件浏览命令

cat, more, less, head, tail,此五个文件浏览类的命令皆为外部命令。

hann@HannYang:~$ which cat
/usr/bin/cat
hann@HannYang:~$ which more
/usr/bin/more
hann@HannYang:~$ which less
/usr/bin/less
hann@HannYang:~$ which head
/usr/bin/head
hann@HannYang:~$ which tail
/usr/bin/tail

(2) more

英文帮助

NAME
       more - file perusal filter for crt viewing

SYNOPSIS
       more [options] file...

DESCRIPTION
       more  is  a  filter  for  paging  through text one screenful at a time.  This version is especially primitive.
       Users should realize that less(1) provides more(1) emulation plus extensive enhancements.

OPTIONS
       Options are also taken from the environment variable MORE (make sure to precede them with a dash (-)) but com‐mand-line options will override those.

       -d     Prompt  with "[Press space to continue, 'q' to quit.]", and display "[Press 'h' for instructions.]" in‐stead of ringing the bell when an illegal key is pressed.

       -l     Do not pause after any line containing a ^L (form feed).

       -f     Count logical lines, rather than screen lines (i.e., long lines are not folded).

       -p     Do not scroll.  Instead, clear the whole screen and then display the text.  Notice that this option  is switched on automatically if the executable is named page.

       -c     Do  not  scroll.  Instead, paint each screen from the top, clearing the remainder of each line as it is displayed.

       -s     Squeeze multiple blank lines into one.

       -u     Suppress underlining.

       -number
              The screen size to use, in number of lines.

       +number
              Start displaying each file at line number.

       +/string
              The string to be searched in each file before starting to display it.

       --help Display help text and exit.

       -V, --version
              Display version information and exit.

COMMANDS
       Interactive commands for more are based on vi(1).  Some commands may be preceded by a decimal number, called k in the descriptions below.  In the following descriptions, ^X means control-X.

              h or ?    Help;  display  a summary of these commands.  If you forget all other commands, remember this one.

              SPACE     Display next k lines of text.  Defaults to current screen size.

              z         Display next k lines of text.  Defaults to current screen size.   Argument  becomes  new  de‐fault.

              RETURN    Display next k lines of text.  Defaults to 1.  Argument becomes new default.

              d or ^D   Scroll k lines.  Default is current scroll size, initially 11.  Argument becomes new default.

              q or Q or INTERRUPT
                        Exit.

              s         Skip forward k lines of text.  Defaults to 1.

              f         Skip forward k screenfuls of text.  Defaults to 1.

              b or ^B   Skip backwards k screenfuls of text.  Defaults to 1.  Only works with files, not pipes.

              '         Go to the place where the last search started.

              =         Display current line number.

              /pattern  Search for kth occurrence of regular expression.  Defaults to 1.

              n         Search for kth occurrence of last regular expression.  Defaults to 1.

              !command or :!command
                        Execute command in a subshell.

              v         Start up an editor at current line.  The editor is taken from the environment variable VISUAL if defined, or EDITOR if VISUAL is not defined, or defaults to vi if neither VISUAL nor  EDI‐TOR is defined.

              ^L        Redraw screen.

              :n        Go to kth next file.  Defaults to 1.

              :p        Go to kth previous file.  Defaults to 1.

              :f        Display current file name and line number.

              .         Repeat previous command.

ENVIRONMENT
       The more command respects the following environment variables, if they exist:

       MORE   This variable may be set with favored options to more.

       SHELL  Current shell in use (normally set by the shell at login time).

       TERM   The terminal type used by more to get the terminal characteristics necessary to manipulate the screen.

       VISUAL The editor the user prefers.  Invoked when command key v is pressed.

       EDITOR The editor of choice when VISUAL is not specified.

SEE ALSO
       less(1), vi(1)

AUTHORS
       Eric Shienbrood, UC Berkeley
       Modified by Geoff Peck, UCB to add underlining, single spacing
       Modified by John Foderaro, UCB to add -c and MORE environment variable

HISTORY
       The  more  command appeared in 3.0BSD.  This man page documents more version 5.19 (Berkeley 6/29/88), which is currently in use in the Linux community.  Documentation was produced using several other versions of  the  man page, and extensive inspection of the source code.

AVAILABILITY
       The  more  command  is  part  of  the  util-linux package and is available from Linux Kernel Archive 〈https://www.kernel.org/pub/linux/utils/util-linux/〉.

hann@HannYang:~$ more --helpUsage:more [options] <file>...A file perusal filter for CRT viewing.Options:-d          display help instead of ringing bell-f          count logical rather than screen lines-l          suppress pause after form feed-c          do not scroll, display text and clean line ends-p          do not scroll, clean screen and display text-s          squeeze multiple blank lines into one-u          suppress underlining-<number>   the number of lines per screenful+<number>   display file beginning from line number+/<string>  display file beginning from search string match--help     display this help-V, --version  display versionFor more details see more(1).
hann@HannYang:~$ more --version
more from util-linux 2.34


http://www.ppmy.cn/news/1027601.html

相关文章

c语言——斐波那契数列应用

//斐波那契数列应用 #include<stdio.h> int main() {int i,n,t10,t21,nextTerm;printf("输出项目数&#xff1a;");scanf("%d",&n);printf("斐波那契数列应用&#xff1a;");for(i1;i<n;i){printf("%d、",t1);nextTermt1…

RTT(RT-Thread)线程间同步(保姆级)

目录 线程间同步 信号量 信号量结构体 信号量的使用和管理 动态创建信号量 实例 静态创建信号量 初始化和脱离信号量 获取信号量 信号量的互斥操作 获取信号量函数 释放信号量 信号量同步实例 互斥量&#xff08;互斥锁&#xff09; 互斥量的使用和管理 动态创…

LTE和5G无线技术对比简介

LTE和5G是两种不同的无线通信技术&#xff0c;它们在速度、延迟、容量、覆盖范围和设备兼容性等方面存在差异。 LTE&#xff0c;即长期演进技术&#xff0c;是一种基于OFDMA的4G蜂窝网络标准&#xff0c;由3GPP组织制定并发布。它的主要目的是改进3G的空中接入技术&#xff0c;…

数据库事务ACID介绍

一、ACID简介 ACID&#xff0c;是指数据库管理系统&#xff08;DBMS&#xff09;在增删改数据的的过程中&#xff0c;为保证事务&#xff08;transaction&#xff09;的准确性&#xff0c;可靠性等&#xff0c;所必须具备的四个特性&#xff1a;原子性&#xff08;atomicity&a…

MATLAB计算连续月份的不同栅格数据间的相关系数(输出为tif影像)

%先导入投影信息&#xff0c;某个影像的路径就行&#xff08;最好是你分析的数据中的一个&#xff09; [a,R]readgeoraster(G:\SIF\Global-AI_monthly_v3\bi\199001.tif); infogeotiffinfo(G:\SIF\Global-AI_monthly_v3\bi\199001.tif); [m,n]size(a); i1;gwzeros(m*n,24); %此…

侯捷 C++ part2 兼谈对象模型笔记——3 模板

3 模板 3.1 类模板/函数模板 补充&#xff1a;只有模板的尖括号中<>&#xff0c;关键字 typename 和 class 是一样的 3.2 成员模板 它即是模板的一部分&#xff0c;自己又是模板&#xff0c;则称为成员模板 其经常用于构造函数 ctor1 这是默认构造函数的实现&#…

phpspreadsheet excel导入导出

单个sheet页Excel2003版最大行数是65536行。Excel2007开始的版本最大行数是1048576行。Excel2003的最大列数是256列&#xff0c;2007以上版本是16384列。 xlswriter xlswriter - PHP 高性能 Excel 扩展&#xff0c;功能类似phpspreadsheet。它能够处理非常大的文件&#xff0…

插入、希尔、归并、快速排序(java实现)

目录 插入排序 希尔排序 归并排序 快速排序 插入排序 排序原理&#xff1a; 1.把所有元素分为两组&#xff0c;第一组是有序已经排好的&#xff0c;第二组是乱序未排序。 2.将未排序一组的第一个元素作为插入元素&#xff0c;倒序与有序组比较。 3.在有序组中找到比插入…