亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
12下一頁(yè)
最近訪問(wèn)板塊 發(fā)新帖
查看: 4523 | 回復(fù): 12
打印 上一主題 下一主題

怎樣設(shè)置man退出時(shí)屏幕不留內(nèi)容 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2010-12-28 12:26 |只看該作者 |倒序?yàn)g覽
在一臺(tái)機(jī)器上使用man幫助命令退出后屏幕什么都沒(méi)留下,只有命令本身,例如
hddu002$ man ls
hddu002$ man ps
hddu002$

而在另一臺(tái)機(jī)器上,man命令退出后,屏幕上幫助的內(nèi)容還在。如下:
hddu003$ man ls
Reformatting page.  Please Wait... done

User Commands                                               ls(1)

NAME
     ls - list contents of directory

SYNOPSIS
     /usr/bin/ls  [-aAbcCdeEfFghHilLmnopqrRstuvVx1@] [file]...

     /usr/xpg4/bin/ls  [-aAbcCdeEfFghHilLmnopqrRstuvVx1@]
     [file]...

     /usr/xpg6/bin/ls  [-aAbcCdeEfFghHilLmnopqrRstuvVx1@]
     [file]...

DESCRIPTION
     For each file that is a directory, ls lists the contents  of
     the  directory.  For  each file that is an ordinary file, ls
。。。(略去一些內(nèi)容)

hddu003$

誰(shuí)知道怎么設(shè)置man退出后,man中的內(nèi)容不顯示?

論壇徽章:
59
2015七夕節(jié)徽章
日期:2015-08-24 11:17:25ChinaUnix專家徽章
日期:2015-07-20 09:19:30每周論壇發(fā)貼之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38榮譽(yù)版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年紀(jì)念徽章
日期:2015-07-20 11:05:27IT運(yùn)維版塊每日發(fā)帖之星
日期:2015-07-20 11:05:34操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-07-20 11:05:36程序設(shè)計(jì)版塊每日發(fā)帖之星
日期:2015-07-20 11:05:40數(shù)據(jù)庫(kù)技術(shù)版塊每日發(fā)帖之星
日期:2015-07-20 11:05:432015年辭舊歲徽章
日期:2015-07-20 11:05:44
2 [報(bào)告]
發(fā)表于 2010-12-28 15:55 |只看該作者
我這里也是有的。

論壇徽章:
18
巳蛇
日期:2014-12-03 08:27:5115-16賽季CBA聯(lián)賽之吉林
日期:2016-04-18 15:24:24qiaoba
日期:2016-06-17 17:41:1615-16賽季CBA聯(lián)賽之八一
日期:2016-06-20 15:13:1415-16賽季CBA聯(lián)賽之廣夏
日期:2016-06-29 10:38:28極客徽章
日期:2016-12-07 14:03:4015-16賽季CBA聯(lián)賽之吉林
日期:2017-03-06 13:47:55
3 [報(bào)告]
發(fā)表于 2010-12-28 16:58 |只看該作者
  1. #man ls;clear
復(fù)制代碼
折中方法

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2010-12-28 17:09 |只看該作者
回復(fù) 3# gilet


    都是這樣的啊

招聘 : 技術(shù)支持/維
論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2010-12-28 18:21 |只看該作者
你是字符界面的嗎?

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2010-12-29 09:52 |只看該作者
百度上沒(méi)找到,Google了半天,終于找到了英文的。

簡(jiǎn)單地說(shuō)就是:
     export PAGER='less'     退出后不保留屏幕
       export PAGER='less -X'      退出后保留屏幕

======================================================
How to prevent Linux man pages from clearing after you quit reading

Man pages are excellent resources for learning the specifics of a Linux command. After all, who can remember all the nitty gritty of a command?

One annoyance of reading man pages on some Linux distributions is that after you quit reading it, the contents are cleared off screen. The man page contents simply don't stay around after you quit man. If that happens to you, it means that the default pager for viewing man pages is the less command, and that is how less behaves.

Wiping man contents out or not is a personal preference. Some may like the man stuff being wiped out because it won't clutter up the command window. However, there are times when you want the man contents to be visible after you finish reading it. You will have that information in front of you when you enter the next command.

The good news is that you can change the man page behavior. This is done by changing the default pager from less to something like more.

[beranger-org has a great/better suggestion: instead of changing to more, use less -X]
You can change it permanently or on demand, and for everyone or just individual users. Because it is a personal preference, I would recommend changing it only for yourself.

First, you need to find out where more is.


$ which more/bin/more

Add the following line in the .bashrc file in your home directory:

export PAGER=/bin/more

If you want to stick with less, add this line instead.

export PAGER='less -X'

That customizes the PAGER environment variable every time a shell process is started.

Beware that the default pager is also used in commands other than man. less is a more powerful pager than more. You may wish just to change the PAGER for the current shell session. This can be done by typing in the exact export statement above into the command line.

If you want to revert to the default PAGER (i.e., less), enter this:

$ unset PAGER

If you really insist on changing the default man behavior permanently for everyone on your system, edit the file /etc/man.config (on RedHat-based systems) or /etc/manpath.config on Debian-based systems, and change the line for PAGER. This affects only man page viewing. Alternatively, you can run update-alternatives --config pager (for Debian) or alternatives --config pager (for RedHat) to globally change the PAGER environment variable for all applications.



This is how you can control man when it exits.


http://linuxcommando.blogspot.co ... man-pages-from.html

評(píng)分

參與人數(shù) 1可用積分 +6 收起 理由
零二年的夏天 + 6 精品文章

查看全部評(píng)分

論壇徽章:
59
2015七夕節(jié)徽章
日期:2015-08-24 11:17:25ChinaUnix專家徽章
日期:2015-07-20 09:19:30每周論壇發(fā)貼之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38榮譽(yù)版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年紀(jì)念徽章
日期:2015-07-20 11:05:27IT運(yùn)維版塊每日發(fā)帖之星
日期:2015-07-20 11:05:34操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-07-20 11:05:36程序設(shè)計(jì)版塊每日發(fā)帖之星
日期:2015-07-20 11:05:40數(shù)據(jù)庫(kù)技術(shù)版塊每日發(fā)帖之星
日期:2015-07-20 11:05:432015年辭舊歲徽章
日期:2015-07-20 11:05:44
7 [報(bào)告]
發(fā)表于 2010-12-29 10:04 |只看該作者
回復(fù) 6# shijiann


    學(xué)習(xí)了。不錯(cuò)。

論壇徽章:
0
8 [報(bào)告]
發(fā)表于 2010-12-29 14:20 |只看該作者
我雖然也見(jiàn)過(guò),但從來(lái)沒(méi)想過(guò)原因
看來(lái)凡事都要問(wèn)個(gè)為什么才能學(xué)到東西。
謝謝了。。。。。。。。。。

論壇徽章:
34
亥豬
日期:2015-03-20 13:55:11戌狗
日期:2015-03-20 13:57:01酉雞
日期:2015-03-20 14:03:56未羊
日期:2015-03-20 14:18:30子鼠
日期:2015-03-20 14:20:14丑牛
日期:2015-03-20 14:20:31辰龍
日期:2015-03-20 14:35:34巳蛇
日期:2015-03-20 14:35:56操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-11-06 06:20:00操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-11-08 06:20:00操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-11-19 06:20:00黃金圣斗士
日期:2015-11-24 10:43:13
9 [報(bào)告]
發(fā)表于 2010-12-29 15:58 |只看該作者
好像本地man后不刪除,遠(yuǎn)程登陸都會(huì)被清理掉。

論壇徽章:
0
10 [報(bào)告]
發(fā)表于 2010-12-29 16:03 |只看該作者
這個(gè)分系統(tǒng)吧 版本  現(xiàn)在用的rh6  cent5.5 用著都直接刪除了
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP