<?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: 10 个实用的 Bash alias</title>
	<atom:link href="http://linuxtoy.org/archives/10-bash-alias.html/feed" rel="self" type="application/rss+xml" />
	<link>http://linuxtoy.org/archives/10-bash-alias.html</link>
	<description>LinuxTOY 是一个致力于提供 Linux 相关资讯的专题站点。如果您发现了好用好玩的 Linux 东东并愿意发扬自由、分享的精神，可以点击顶部导航 Contact 按钮进行投稿。</description>
	<pubDate>Fri, 05 Dec 2008 09:17:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Toy</title>
		<link>http://linuxtoy.org/archives/10-bash-alias.html#comment-89397</link>
		<dc:creator>Toy</dc:creator>
		<pubDate>Tue, 15 Jul 2008 08:32:21 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2146#comment-89397</guid>
		<description>@Rainux: 感谢你的补充，我重新排了一下版。</description>
		<content:encoded><![CDATA[<p>@Rainux: 感谢你的补充，我重新排了一下版。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rainux</title>
		<link>http://linuxtoy.org/archives/10-bash-alias.html#comment-89394</link>
		<dc:creator>Rainux</dc:creator>
		<pubDate>Tue, 15 Jul 2008 08:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2146#comment-89394</guid>
		<description>阿哦，排版乱掉了，请自己在  vim 里 gg=G 排版一下吧。</description>
		<content:encoded><![CDATA[<p>阿哦，排版乱掉了，请自己在  vim 里 gg=G 排版一下吧。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rainux</title>
		<link>http://linuxtoy.org/archives/10-bash-alias.html#comment-89393</link>
		<dc:creator>Rainux</dc:creator>
		<pubDate>Tue, 15 Jul 2008 08:10:05 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2146#comment-89393</guid>
		<description>好吧，我出必杀了。虽然不是 alias。

用于在当前目录以及所有子目录中搜索包含特定 pattern 的文件，可以用 pattern 来过滤将要搜索的文件名。

用法:
&lt;pre&gt;&lt;code&gt;
  grep_for pattern_to_search
  grep_for pattern_to_search \.rb$
  gvim `grep_for pattern_to_search \.rb$ -l`

grep_for() {
    local content=$1

    if [ -z "$2" ]
    then
        shift
    else
        local flag=`echo $2 &#124; sed 's/^\(.\).*$/\1/'`
        if [ "$flag" == "-" ]
        then
            shift
        else
            local filter=$2
            shift
            shift
        fi  
    fi  


    if [ -z "$filter" ]
    then
        find -print0 &#124; grep -zv '\.svn' &#124; xargs -0 grep --color $content $@
    else
        find -print0 &#124; grep -zv '\.svn' &#124; grep -z $filter &#124; xargs -0 grep --color $content $@
    fi  
}
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>好吧，我出必杀了。虽然不是 alias。</p>
<p>用于在当前目录以及所有子目录中搜索包含特定 pattern 的文件，可以用 pattern 来过滤将要搜索的文件名。</p>
<p>用法:</p>
<pre><code>
  grep_for pattern_to_search
  grep_for pattern_to_search \.rb$
  gvim `grep_for pattern_to_search \.rb$ -l`

grep_for() {
    local content=$1

    if [ -z "$2" ]
    then
        shift
    else
        local flag=`echo $2 | sed &#8217;s/^\(.\).*$/\1/&#8217;`
        if [ "$flag" == "-" ]
        then
            shift
        else
            local filter=$2
            shift
            shift
        fi
    fi  

    if [ -z "$filter" ]
    then
        find -print0 | grep -zv &#8216;\.svn&#8217; | xargs -0 grep &#8211;color $content $@
    else
        find -print0 | grep -zv &#8216;\.svn&#8217; | grep -z $filter | xargs -0 grep &#8211;color $content $@
    fi
}
</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: baj</title>
		<link>http://linuxtoy.org/archives/10-bash-alias.html#comment-89358</link>
		<dc:creator>baj</dc:creator>
		<pubDate>Mon, 14 Jul 2008 14:53:30 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2146#comment-89358</guid>
		<description>我也帖一个，呵呵：
alias ..='cd ..'
alias ...='cd ../..'
alias cd..='cd ..'
alias cls='clear'
alias egrep='egrep --color -n'
alias fm='free -mt'
alias gi='gvim'
alias git-diff='git-diff --color'
alias grep='grep --colour=auto'
alias info='pinfo'
alias ki='kwrite'
alias l='ls -alF'
alias l.='ls -a .* -d'
alias la='ls -la'
alias ll='ls -l'
alias ls='ls --color=auto'
alias mat='matlab -nodesktop -nosplash'
alias o='less'
alias pa='ps aux'
alias pe='ps -e'
alias pt='pstree'</description>
		<content:encoded><![CDATA[<p>我也帖一个，呵呵：<br />
alias ..=&#8217;cd ..&#8217;<br />
alias &#8230;=&#8217;cd ../..&#8217;<br />
alias cd..=&#8217;cd ..&#8217;<br />
alias cls=&#8217;clear&#8217;<br />
alias egrep=&#8217;egrep &#8211;color -n&#8217;<br />
alias fm=&#8217;free -mt&#8217;<br />
alias gi=&#8217;gvim&#8217;<br />
alias git-diff=&#8217;git-diff &#8211;color&#8217;<br />
alias grep=&#8217;grep &#8211;colour=auto&#8217;<br />
alias info=&#8217;pinfo&#8217;<br />
alias ki=&#8217;kwrite&#8217;<br />
alias l=&#8217;ls -alF&#8217;<br />
alias l.=&#8217;ls -a .* -d&#8217;<br />
alias la=&#8217;ls -la&#8217;<br />
alias ll=&#8217;ls -l&#8217;<br />
alias ls=&#8217;ls &#8211;color=auto&#8217;<br />
alias mat=&#8217;matlab -nodesktop -nosplash&#8217;<br />
alias o=&#8217;less&#8217;<br />
alias pa=&#8217;ps aux&#8217;<br />
alias pe=&#8217;ps -e&#8217;<br />
alias pt=&#8217;pstree&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DS</title>
		<link>http://linuxtoy.org/archives/10-bash-alias.html#comment-89287</link>
		<dc:creator>DS</dc:creator>
		<pubDate>Sun, 13 Jul 2008 07:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2146#comment-89287</guid>
		<description>楼上的增强版

str='..'
level='./../'
for i in `seq 1 10`;
do
    eval "alias '$str=cd $level'"
    level=$level'../'
    str=$str'.'
done</description>
		<content:encoded><![CDATA[<p>楼上的增强版</p>
<p>str=&#8217;..&#8217;<br />
level=&#8217;./../&#8217;<br />
for i in `seq 1 10`;<br />
do<br />
    eval &#8220;alias &#8216;$str=cd $level&#8217;&#8221;<br />
    level=$level&#8217;../&#8217;<br />
    str=$str&#8217;.&#8217;<br />
done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robbie</title>
		<link>http://linuxtoy.org/archives/10-bash-alias.html#comment-89276</link>
		<dc:creator>robbie</dc:creator>
		<pubDate>Sat, 12 Jul 2008 15:30:59 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2146#comment-89276</guid>
		<description>加1个

alias ...='cd ../..'</description>
		<content:encoded><![CDATA[<p>加1个</p>
<p>alias &#8230;=&#8217;cd ../..&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chenxing</title>
		<link>http://linuxtoy.org/archives/10-bash-alias.html#comment-89255</link>
		<dc:creator>chenxing</dc:creator>
		<pubDate>Sat, 12 Jul 2008 01:45:35 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2146#comment-89255</guid>
		<description>alias convmv-utf8=”convmv -f gbk -t utf-8 –notest”
这个，有点危险吧，可以先把--notest拿到外面~</description>
		<content:encoded><![CDATA[<p>alias convmv-utf8=”convmv -f gbk -t utf-8 –notest”<br />
这个，有点危险吧，可以先把&#8211;notest拿到外面~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qiang_liu8183</title>
		<link>http://linuxtoy.org/archives/10-bash-alias.html#comment-89252</link>
		<dc:creator>qiang_liu8183</dc:creator>
		<pubDate>Fri, 11 Jul 2008 18:57:22 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2146#comment-89252</guid>
		<description>也来贡献几个

alias x='startx'
alias sd='sudo poweroff'
alias rb='sudo reboot'
alias Scc='sudo pacman -Scc'
alias Syu='sudo pacman -Syu'
alias ls='ls -a --color=auto'
alias ll='ls -l'
alias ..='cd ..'
alias ubuntu='lftp username:password@ftp.ubuntu.org.cn'</description>
		<content:encoded><![CDATA[<p>也来贡献几个</p>
<p>alias x=&#8217;startx&#8217;<br />
alias sd=&#8217;sudo poweroff&#8217;<br />
alias rb=&#8217;sudo reboot&#8217;<br />
alias Scc=&#8217;sudo pacman -Scc&#8217;<br />
alias Syu=&#8217;sudo pacman -Syu&#8217;<br />
alias ls=&#8217;ls -a &#8211;color=auto&#8217;<br />
alias ll=&#8217;ls -l&#8217;<br />
alias ..=&#8217;cd ..&#8217;<br />
alias ubuntu=&#8217;lftp username:password@ftp.ubuntu.org.cn&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toy</title>
		<link>http://linuxtoy.org/archives/10-bash-alias.html#comment-89246</link>
		<dc:creator>Toy</dc:creator>
		<pubDate>Fri, 11 Jul 2008 14:03:43 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2146#comment-89246</guid>
		<description>@zhuqin：汗，笔误，已修正。</description>
		<content:encoded><![CDATA[<p>@zhuqin：汗，笔误，已修正。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wanzigunzi</title>
		<link>http://linuxtoy.org/archives/10-bash-alias.html#comment-89245</link>
		<dc:creator>wanzigunzi</dc:creator>
		<pubDate>Fri, 11 Jul 2008 13:57:33 +0000</pubDate>
		<guid isPermaLink="false">http://linuxtoy.org/?p=2146#comment-89245</guid>
		<description>df不如用df -Th</description>
		<content:encoded><![CDATA[<p>df不如用df -Th</p>
]]></content:encoded>
	</item>
</channel>
</rss>
