历史被执行人信息如何消除(什么叫历史被执行人是未付款)

六八 121 0

历史被执行人信息如何消除(什么叫历史被执行人是未付款) 第1张

假如你时常采用 Linux 指示行,所以采用 history(发展史)指示能有效地提高你的工作效率,责任编辑将透过示例的形式向你如是说 history 指示的 15 个用语。

历史被执行人信息如何消除(什么叫历史被执行人是未付款) 第2张

采用 HISTTIMEFORMAT 表明天数戳当你从指示行继续执行 history 指示后,一般来说只会表明已继续执行指示的序列号和指示这类,假如你想查阅指示发展史的天数戳,所以能继续执行:# export HISTTIMEFORMAT=%F %T

# history | more12008-08-0519:02:39servicenetworkrestart22008-08-0519:02:39exit32008-08-0519:02:39id4

2008-08-0519:02:39cat/etc/redhat-release特别注意:那个机能根本无法用在当 HISTTIMEFORMAT 那个配置文件被增设后的这些新继续执行的 bash 指示才会被打上恰当的天数戳。

在此后的大部份指示,都将会表明成增设 HISTTIMEFORMAT 表达式的天数采用 Ctrl+R 搜寻发展史Ctrl+R 是我时常采用的两个机能键,此机能键让你对指示发展史展开搜寻,对想多次重复继续执行某一指示的这时候十分管用。

当找出指示后,一般来说再按quarterfinal键就能继续执行pre该指示,假如想对找出的指示展开修正后再继续执行,则能按呵呵左或右摇杆# [Press Ctrl+R from the command prompt, which will display the reverse-i-search prompt]

(reverse-i-search)`red‘: cat /etc/redhat-release [Note: Press enter when you see your command, which will

execute the command from the history] # cat /etc/redhat-release Fedora release9 (Sulphur)加速多次重复继续执行上两条指示有 4 种形式能多次重复继续执行上两条指示:

1.采用上摇杆,并quarterfinal继续执行2.按 !! 并quarterfinal继续执行3.输出 !-1 并quarterfinal继续执行4.按 Ctrl+P 并quarterfinal继续执行从指示发展史中继续执行两个选定的指示在上面的范例中,假如你想多次重复继续执行第 4 条指示,所以能继续执行 !4:。

# history | more1service network restart2exit3id4cat /etc/redhat-release# !4cat/etc/redhat-releaseFedora

release 9 (Sulphur)透过选定关键字来继续执行以前的指示在上面的范例,输出 !ps 并quarterfinal,将继续执行以 ps 打头的指示:# !pspsaux|grepyproot169470.00.136516

1264?Sl13:100:00ypbindroot175030.00.04124740pts/0S+19:190:00grepyp采用 HISTSIZE 控制发展史指示记录的总行数将上面两行内容追加到 .bash_profile 文件并重新登录 bash shell,指示发展史的记录数将变成 450 条:

# vi ~/.bash_profileHISTSIZE=450HISTFILESIZE=450采用 HISTFILE 更改发展史文件名称默认情况下,指示发展史存储在 ~/.bash_history 文件中,添加下列内容到 .bash_profile 文件并重新登录 bash shell,将采用 .commandline_warrior 来存储指示发展史:

# vi ~/.bash_profileHISTFILE=/root/.commandline_warrior采用 HISTCONTROL 从指示发展史中剔除连续多次重复的条目在上面的范例中,pwd 指示被连续继续执行了三次。

继续执行 history 后你会看到三条多次重复的条目,要剔除这些多次重复的条目,你能将 HISTCONTROL 增设为 ignoredups:# pwd# pwd# pwd# history | tail -4

44 pwd 45 pwd 46 pwd [Note that there are three pwd commands inhistory, after executing pwd 3 times

as shown above] 47 history | tail -4 # export HISTCONTROL=ignoredups# pwd# pwd# pwd# history | tail -3

56 export HISTCONTROL=ignoredups 57 pwd [Note that there is only one pwdcommandin the history, even after executing

pwd 3 times as shown above] 58 history | tail -4采用 HISTCONTROL 清除整个指示发展史中的多次重复条目上例中的 ignoredups 根本无法剔除连续的多次重复条目,要清除整个指示发展史中的多次重复条目,能将 HISTCONTROL 增设成 erasedups:

# export HISTCONTROL=erasedups# pwd# service httpd stop# history | tail -338pwd39servicehttpdstop40history

|tail-3# ls -ltr# service httpd stop# history | tail -635exportHISTCONTROL=erasedups36pwd37history|tail

-338ls-ltr39servicehttpdstop[Notethatthepreviousservicehttpdstopafterpwdgoterased]40history|tail-6采用 HISTCONTROL 强制 history 不记住特定的指示

将 HISTCONTROL 增设为 ignorespace,并在不想被记住的指示前面输出两个空格:# export HISTCONTROL=ignorespace# ls -ltr# pwd# service httpd stop [Note that there is a space at the beginning of service, to ignore this command from history]

# history | tail -367ls-ltr68pwd69history|tail-3采用 -c 选项清除大部份的指示发展史假如你想清除大部份的指示发展史,能继续执行:#history -c指示替换在上面的范例里,!!:$ 将为当前的指示获得上两条指示的参数:

# ls anaconda-ks.cfganaconda-ks.cfg# vi !!:$vianaconda-ks.cfg补充:采用 !$ 能达到同样的效果,而且更简单下例中,!^ 从上两条指示获得第一项参数:。

# cpanaconda-ks.cfganaconda-ks.cfg.bakanaconda-ks.cfg # vi-5 !^ vianaconda-ks.cfg为特定的指示替换选定的参数在上面的范例,!cp:2 从指示发展史中搜寻以 cp 开头的指示,并获取它的第二项参数:

# cp ~/longname.txt /really/a/very/long/path/long-filename.txt# ls -l !cp:2 ls -l /really/a/very/long

/path/long-filename.txt下例里,!cp:$ 获取 cp 指示的最后一项参数:# ls -l !cp:$ ls -l /really/a/very/long/path/long-filename.txt

采用 HISTSIZE 禁用 history假如你想禁用 history,能将 HISTSIZE 增设为 0:#export HISTSIZE=0#history# [Note that history

did not display anything]采用 HISTIGNORE 忽略发展史中的特定指示上面的范例,将忽略 pwd、ls、ls -ltr 等指示:# export HISTIGNORE=”pwd:ls:ls -ltr:”

# pwd# ls# ls -ltr# service httpd stop# history | tail -3 79 export HISTIGNORE=”pwd:ls:ls -ltr:” 80 service httpd stop 81

history [Note that history did not record pwd, ls and ls -ltr]原文来自:https://linuxtoy.org/archives/history-command-usage-examples.html

责任编辑地址:https://www.linuxprobe.com/history-15-cases.html

发表评论 (已有0条评论)

还木有评论哦,快来抢沙发吧~

先修复后付款18703823046