<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: History（历史）命令用法 15 例</title>
	<atom:link href="http://www.linuxtoy.org/archives/history-command-usage-examples.html/feed" rel="self" type="application/rss+xml" />
	<link>http://linuxtoy.org/archives/history-command-usage-examples.html</link>
	<description>LinuxTOY 是一个致力于提供 Linux 相关资讯的专题站点。如果您发现了好用好玩的 Linux 东东并愿意发扬自由、分享的精神，可以点击顶部导航 Contact 按钮进行投稿。</description>
	<pubDate>Fri, 10 Feb 2012 12:46:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: 太极美术工程师师长</title>
		<link>http://linuxtoy.org/archives/history-command-usage-examples.html#comment-135731</link>
		<dc:creator>太极美术工程师师长</dc:creator>
		<pubDate>Mon, 11 Jan 2010 02:24:24 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2367#comment-135731</guid>
		<description>&lt;p&gt;好东西。
Ctrl+R
!4
!ps&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>好东西。
Ctrl+R
!4
!ps</p>]]></content:encoded>
	</item>
	<item>
		<title>By: lovelywcm</title>
		<link>http://linuxtoy.org/archives/history-command-usage-examples.html#comment-92260</link>
		<dc:creator>lovelywcm</dc:creator>
		<pubDate>Wed, 10 Sep 2008 14:14:19 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2367#comment-92260</guid>
		<description>&lt;p&gt;可以grep 后清除掉重复的命令。
当然，如果指定了 HISTCONTROL=erasedups 就没必要。
不过个人习惯保留这些记录，毕竟必要的时候可以回顾下到底做了些什么。
最多用 HISTCONTROL=ignoredups 。&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>可以grep 后清除掉重复的命令。
当然，如果指定了 HISTCONTROL=erasedups 就没必要。
不过个人习惯保留这些记录，毕竟必要的时候可以回顾下到底做了些什么。
最多用 HISTCONTROL=ignoredups 。</p>]]></content:encoded>
	</item>
	<item>
		<title>By: lovelywcm</title>
		<link>http://linuxtoy.org/archives/history-command-usage-examples.html#comment-92259</link>
		<dc:creator>lovelywcm</dc:creator>
		<pubDate>Wed, 10 Sep 2008 13:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2367#comment-92259</guid>
		<description>&lt;p&gt;关于 history &#124; grep&lt;/p&gt;

&lt;p&gt;下面这个更好用～：&lt;/p&gt;

&lt;p&gt;hg(){ history &#124; grep $* &#124; sort -k 2 &#124; uniq -s 7 &#124; sort -g &#124; more; }&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>关于 history | grep</p>

<p>下面这个更好用～：</p>

<p>hg(){ history | grep $* | sort -k 2 | uniq -s 7 | sort -g | more; }</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://linuxtoy.org/archives/history-command-usage-examples.html#comment-92202</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 08 Sep 2008 07:16:57 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2367#comment-92202</guid>
		<description>&lt;p&gt;还有一种命令替换的用法,^string1^string2,例如daniel@daniel-laptop:~/.mozilla-thunderbird$ ls
profiles.ini
daniel@daniel-laptop:~/.mozilla-thunderbird$ ^l^p
ps
  PID TTY          TIME CMD
 6706 pts/0    00:00:00 bash
24686 pts/0    00:00:00 ps&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>还有一种命令替换的用法,^string1^string2,例如daniel@daniel-laptop:~/.mozilla-thunderbird$ ls
profiles.ini
daniel@daniel-laptop:~/.mozilla-thunderbird$ ^l^p
ps
  PID TTY          TIME CMD
 6706 pts/0    00:00:00 bash
24686 pts/0    00:00:00 ps</p>]]></content:encoded>
	</item>
	<item>
		<title>By: anon</title>
		<link>http://linuxtoy.org/archives/history-command-usage-examples.html#comment-92196</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Mon, 08 Sep 2008 05:39:18 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2367#comment-92196</guid>
		<description>&lt;p&gt;我来请教一下，我的 .bashrc 中是设置了 &lt;code&gt;export HISTCONTROL= 'erasedups'&lt;/code&gt;，我的习惯是一开机进入桌面就打开终端 tilda，不用时隐藏，需时呼出，关机时才退出，但我查看 .bash_history 根本就是有很多重复命令呀，erasedups 怎么没有起作用，是哪里有问题？&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>我来请教一下，我的 .bashrc 中是设置了 <code>export HISTCONTROL= 'erasedups'</code>，我的习惯是一开机进入桌面就打开终端 tilda，不用时隐藏，需时呼出，关机时才退出，但我查看 .bash_history 根本就是有很多重复命令呀，erasedups 怎么没有起作用，是哪里有问题？</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Toy</title>
		<link>http://linuxtoy.org/archives/history-command-usage-examples.html#comment-92180</link>
		<dc:creator>Toy</dc:creator>
		<pubDate>Mon, 08 Sep 2008 01:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2367#comment-92180</guid>
		<description>&lt;p&gt;@anton, 雪梨, NightOwl, wanzigunzi: 感谢几位补充。&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@anton, 雪梨, NightOwl, wanzigunzi: 感谢几位补充。</p>]]></content:encoded>
	</item>
	<item>
		<title>By: anton</title>
		<link>http://linuxtoy.org/archives/history-command-usage-examples.html#comment-92176</link>
		<dc:creator>anton</dc:creator>
		<pubDate>Mon, 08 Sep 2008 01:32:21 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2367#comment-92176</guid>
		<description>&lt;p&gt;@NightOwl
感謝說明，你是對的。&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@NightOwl
感謝說明，你是對的。</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>http://linuxtoy.org/archives/history-command-usage-examples.html#comment-92169</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Sun, 07 Sep 2008 14:54:24 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2367#comment-92169</guid>
		<description>&lt;p&gt;alias hm="history &#124; grep" 这个最常用&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>alias hm="history | grep" 这个最常用</p>]]></content:encoded>
	</item>
	<item>
		<title>By: wanzigunzi</title>
		<link>http://linuxtoy.org/archives/history-command-usage-examples.html#comment-92163</link>
		<dc:creator>wanzigunzi</dc:creator>
		<pubDate>Sun, 07 Sep 2008 09:50:44 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2367#comment-92163</guid>
		<description>&lt;p&gt;命令替换 
在下面的例子里，!!:$ 将为当前的命令获得上一条命令的参数&lt;/p&gt;

&lt;p&gt;这个，输入!$就是上一个使用过的参数了，例如
$ls /media
$cd !$&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>命令替换 
在下面的例子里，!!:$ 将为当前的命令获得上一条命令的参数</p>

<p>这个，输入!$就是上一个使用过的参数了，例如
$ls /media
$cd !$</p>]]></content:encoded>
	</item>
	<item>
		<title>By: venhow</title>
		<link>http://linuxtoy.org/archives/history-command-usage-examples.html#comment-92162</link>
		<dc:creator>venhow</dc:creator>
		<pubDate>Sun, 07 Sep 2008 08:22:10 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2367#comment-92162</guid>
		<description>&lt;p&gt;nice&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>nice</p>]]></content:encoded>
	</item>
</channel>
</rss>

