linux cat more head tail 查看文本

      網(wǎng)友投稿 660 2025-04-03

      ECS信息

      規(guī)格:2vCPUs | 4GiB | kc1.large.2

      鏡像:openEuler 20.03 64bit with ARM | 公共鏡像

      linux cat more Head tail 查看文本

      # cat ssh_config -n 1 # $OpenBSD: ssh_config,v 1.33 2017/05/07 23:12:57 djm Exp $ 2 3 # This is the ssh client system-wide configuration file. See 4 # ssh_config(5) for more information. This file provides defaults for 5 # users, and the values can be changed in per-user configuration files 6 # or on the command line. 7 8 # Configuration data is parsed as follows: 9 # 1. command line options 10 # 2. user-specific file 11 # 3. system-wide file 12 # Any configuration value is only changed the first time it is set. 13 # Thus, host-specific definitions should be at the beginning of the 14 # configuration file, and defaults at the end. 15 16 # Site-wide defaults for some commonly used options. For a comprehensive 17 # list of available options, their meanings and defaults, please see the 18 # ssh_config(5) man page. 19 20 # Host * 21 # ForwardAgent no 22 # ForwardX11 no 23 # PasswordAuthentication yes 24 # HostbasedAuthentication no 25 # GSSAPIAuthentication no 26 # GSSAPIDelegateCredentials no 27 # GSSAPIKeyExchange no 28 # GSSAPITrustDNS no 29 # BatchMode no 30 # CheckHostIP yes 31 # AddressFamily any 32 # ConnectTimeout 0 33 # StrictHostKeyChecking ask 34 # IdentityFile ~/.ssh/id_rsa 35 # IdentityFile ~/.ssh/id_dsa 36 # IdentityFile ~/.ssh/id_ecdsa 37 # IdentityFile ~/.ssh/id_ed25519 38 # Port 22 39 # Protocol 2 40 # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc 41 # MACs hmac-md5,hmac-sha1,umac-64@openssh.com 42 # EscapeChar ~ 43 # Tunnel no 44 # TunnelDevice any:any 45 # PermitLocalCommand no 46 # VisualHostKey no 47 # ProxyCommand ssh -q -W %h:%p gateway.example.com 48 # RekeyLimit 1G 1h 49 # 50 # To modify the system-wide ssh configuration, create a *.conf file under 51 # /etc/ssh/ssh_config.d/ which will be automatically included below 52 Include /etc/ssh/ssh_config.d/*.conf

      more 可以滾動查看大文本

      -5 的意思是 每屏顯示5行

      向下瀏覽是 z 或者 space

      向上瀏覽是 b

      # more -5 ssh_config # $OpenBSD: ssh_config,v 1.33 2017/05/07 23:12:57 djm Exp $ # This is the ssh client system-wide configuration file. See # ssh_config(5) for more information. This file provides defaults for # users, and the values can be changed in per-user configuration files --More--(15%)

      # Head -n 10 sshd_config # $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. # This sshd was compiled with PATH=/usr/local/bin:/usr/bin # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented. Uncommented options override the

      linux cat more head tail 查看文本

      # pwd /var/log # tail -f secure Oct 2 22:52:37 ecs-4eee sshd[21279]: pam_unix(sshd:session): session closed for user root Oct 2 22:52:37 ecs-4eee sshd[21344]: pam_unix(sshd:session): session closed for user root Oct 2 22:55:38 ecs-4eee sshd[21438]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 22:55:38 ecs-4eee sshd[21503]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 22:56:33 ecs-4eee sshd[21438]: pam_unix(sshd:session): session closed for user root Oct 2 22:56:33 ecs-4eee sshd[21503]: pam_unix(sshd:session): session closed for user root Oct 2 23:09:18 ecs-4eee sshd[21605]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 23:09:19 ecs-4eee sshd[21670]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 23:09:27 ecs-4eee sshd[21605]: pam_unix(sshd:session): session closed for user root Oct 2 23:09:27 ecs-4eee sshd[21670]: pam_unix(sshd:session): session closed for user root

      此時再新建一個ssh會話,查看日志輸出變化

      # tail -f secure Oct 2 22:52:37 ecs-4eee sshd[21279]: pam_unix(sshd:session): session closed for user root Oct 2 22:52:37 ecs-4eee sshd[21344]: pam_unix(sshd:session): session closed for user root Oct 2 22:55:38 ecs-4eee sshd[21438]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 22:55:38 ecs-4eee sshd[21503]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 22:56:33 ecs-4eee sshd[21438]: pam_unix(sshd:session): session closed for user root Oct 2 22:56:33 ecs-4eee sshd[21503]: pam_unix(sshd:session): session closed for user root Oct 2 23:09:18 ecs-4eee sshd[21605]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 23:09:19 ecs-4eee sshd[21670]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 23:09:27 ecs-4eee sshd[21605]: pam_unix(sshd:session): session closed for user root Oct 2 23:09:27 ecs-4eee sshd[21670]: pam_unix(sshd:session): session closed for user root Oct 2 23:10:34 ecs-4eee sshd[21740]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 23:10:34 ecs-4eee sshd[21805]: pam_unix(sshd:session): session opened for user root by (uid=0)

      關(guān)閉新建的ssh會話,查看日志輸出變化

      # tail -f secure Oct 2 22:52:37 ecs-4eee sshd[21279]: pam_unix(sshd:session): session closed for user root Oct 2 22:52:37 ecs-4eee sshd[21344]: pam_unix(sshd:session): session closed for user root Oct 2 22:55:38 ecs-4eee sshd[21438]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 22:55:38 ecs-4eee sshd[21503]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 22:56:33 ecs-4eee sshd[21438]: pam_unix(sshd:session): session closed for user root Oct 2 22:56:33 ecs-4eee sshd[21503]: pam_unix(sshd:session): session closed for user root Oct 2 23:09:18 ecs-4eee sshd[21605]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 23:09:19 ecs-4eee sshd[21670]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 23:09:27 ecs-4eee sshd[21605]: pam_unix(sshd:session): session closed for user root Oct 2 23:09:27 ecs-4eee sshd[21670]: pam_unix(sshd:session): session closed for user root Oct 2 23:10:34 ecs-4eee sshd[21740]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 23:10:34 ecs-4eee sshd[21805]: pam_unix(sshd:session): session opened for user root by (uid=0) Oct 2 23:10:53 ecs-4eee sshd[21740]: pam_unix(sshd:session): session closed for user root Oct 2 23:10:53 ecs-4eee sshd[21805]: pam_unix(sshd:session): session closed for user root

      幫助文檔(部分)

      # cat --help Usage: cat [OPTION]... [FILE]... Concatenate FILE(s) to standard output. With no FILE, or when FILE is -, read standard input. -A, --show-all equivalent to -vET -b, --number-nonblank number nonempty output lines, overrides -n -e equivalent to -vE -E, --show-ends display $ at end of each line -n, --number number all output lines -s, --squeeze-blank suppress repeated empty output lines -t equivalent to -vT -T, --show-tabs display TAB characters as ^I -u (ignored) -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB --help display this help and exit --version output version information and exit Examples: cat f - g Output f's contents, then standard input, then g's contents. cat Copy standard input to standard output. GNU coreutils online help: Full documentation or available locally via: info '(coreutils) cat invocation'

      # more --help Usage: more [options] ... 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 - the number of lines per screenful + display file beginning from line number +/ display file beginning from search string match --help display this help -V, --version display version For more details see more(1).

      # head --help Usage: head [OPTION]... [FILE]... Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -c, --bytes=[-]NUM print the first NUM bytes of each file; with the leading '-', print all but the last NUM bytes of each file -n, --lines=[-]NUM print the first NUM lines instead of the first 10; with the leading '-', print all but the last NUM lines of each file -q, --quiet, --silent never print headers giving file names -v, --verbose always print headers giving file names -z, --zero-terminated line delimiter is NUL, not newline --help display this help and exit --version output version information and exit NUM may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y. Binary prefixes can be used, too: KiB=K, MiB=M, and so on. GNU coreutils online help: Full documentation or available locally via: info '(coreutils) head invocation'

      # tail --help Usage: tail [OPTION]... [FILE]... Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -c, --bytes=[+]NUM output the last NUM bytes; or use -c +NUM to output starting with byte NUM of each file -f, --follow[={name|descriptor}] output appended data as the file grows; an absent option argument means 'descriptor' -F same as --follow=name --retry -n, --lines=[+]NUM output the last NUM lines, instead of the last 10; or use -n +NUM to output starting with line NUM ......

      學(xué)習(xí)資料

      彈性云服務(wù)器 ECS

      openEuler-官網(wǎng)

      openEuler-B站

      openEuler-慕課

      openEuler-文檔

      鯤鵬社區(qū)

      歡迎各位同學(xué)一起來交流學(xué)習(xí)心得^_^

      Linux openEuler

      版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實的內(nèi)容,請聯(lián)系我們jiasou666@gmail.com 處理,核實后本網(wǎng)站將在24小時內(nèi)刪除侵權(quán)內(nèi)容。

      版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實的內(nèi)容,請聯(lián)系我們jiasou666@gmail.com 處理,核實后本網(wǎng)站將在24小時內(nèi)刪除侵權(quán)內(nèi)容。

      上一篇:Scratch貓爪老鼠游戲 電子學(xué)會圖形化編程scratch等級考試三級真題答案2019-9
      下一篇:Excel2010單元格怎么輸入彩色的多行文字?
      相關(guān)文章
      亚洲人成无码网站| 亚洲日韩精品无码专区网站 | 亚洲免费电影网站| 亚洲一区综合在线播放| 亚洲国产精品无码久久SM| 亚洲日韩精品射精日| 奇米影视亚洲春色| 亚洲精品无码你懂的网站| 亚洲av日韩av欧v在线天堂| 亚洲不卡无码av中文字幕| 亚洲А∨精品天堂在线| 国产成人亚洲午夜电影| 亚洲福利精品一区二区三区| 亚洲国产成人VA在线观看| 亚洲中文无韩国r级电影| 中文字幕亚洲一区| 亚洲精品无码久久久影院相关影片| 国产日产亚洲系列| 亚洲国产另类久久久精品| 亚洲AV本道一区二区三区四区| 亚洲av综合avav中文| 亚洲av日韩综合一区在线观看| 亚洲A∨无码一区二区三区| 亚洲视频一区调教| 亚洲国产日韩在线一区| 亚洲欧洲日韩国产一区二区三区| 亚洲偷偷自拍高清| 国产综合激情在线亚洲第一页| 亚洲av无码天堂一区二区三区| 久久亚洲高清综合| 亚洲gv白嫩小受在线观看| 青青草原精品国产亚洲av| 亚洲人成网站18禁止久久影院| 亚洲综合色一区二区三区| 国产成人亚洲精品蜜芽影院| 国产啪亚洲国产精品无码| 亚洲AV无码精品无码麻豆| 亚洲成人午夜电影| 亚洲免费综合色在线视频| 亚洲国产精品嫩草影院久久| 国产亚洲精品一品区99热|