<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Saeid Zebardast&#039;s Blog &#187; Bash</title> <atom:link href="http://zebardast.ir/en/category/bash/feed/" rel="self" type="application/rss+xml" /><link>http://zebardast.ir/en</link> <description></description> <lastBuildDate>Sun, 23 Oct 2011 18:18:07 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator><image><title>Saeid Zebardast&#039;s Blog</title> <url>http://0.gravatar.com/avatar/1518e6b905d65cbe0a03243a199e18fc.png?s=48</url><link>http://zebardast.ir/en</link> </image> <item><title>Linux and UNIX bash shell aliases</title><link>http://zebardast.ir/en/linux-and-unix-bash-shell-aliases/</link> <comments>http://zebardast.ir/en/linux-and-unix-bash-shell-aliases/#comments</comments> <pubDate>Sun, 06 Jan 2008 08:39:05 +0000</pubDate> <dc:creator>Saeid Zebardast</dc:creator> <category><![CDATA[Bash]]></category> <category><![CDATA[GNU/Linux]]></category> <category><![CDATA[Shell]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[alias]]></category><guid isPermaLink="false">http://zebardast.wordpress.com/2008/01/06/linux-and-unix-bash-shell-aliases/</guid> <description><![CDATA[Hi Commonly used for a long strings that are frequently used. Alias allows you to have a small more familiar command or name to execute a long string. Set an alias Syntax alias [name[='command'] name Specifies the alias name. command Specifies the command the name should be an alias for. -a Removes all alias definitions [...] No related posts.]]></description> <content:encoded><![CDATA[<p><img src="http://zebardast.files.wordpress.com/2007/12/terminal_icon_48_48.jpg" alt="shell" align='right' /><br /> Hi</p><p>Commonly used for a long strings that are frequently used. Alias allows you to have a small more familiar command or name to execute a long string.</p><p><strong>Set an alias</strong><br /> <em>Syntax</em><br /> alias [name[='command']</p><table><tr><td>name</td><td>Specifies the alias name.</td></tr><tr><td>command</td><td>Specifies the command the name should be an alias for.</td></tr><tr><td>-a</td><td>Removes all alias definitions from the current shell execution environment.</td></tr><tr><td>-t</td><td>Sets and lists tracked aliases.</td></tr><tr><td>-x</td><td>Sets or prints exported aliases. An exported alias is defined for scripts invoked by name.</td></tr><tr><td>-p</td><td>Prints the list of aliases.</td></tr></table><p><em>Examples</em><br /> alias command with no arguments or with the -p option prints the list of aliases:</p><pre>
$ alias
alias ff='firefox'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -l'
alias ls='ls --color=auto'
alias sx='startx'
</pre><p>Sets clr to type clear</p><pre>
$ alias clr='clear'
</pre><p><strong>Remove an alias</strong><br /> <em>Syntax</em><br /> unalias [name]</p><table><tr><td>name</td><td>Specifies the alias name.</td></tr><tr><td>-a</td><td>Removes all alias definitions</td></tr></table><p>Clear all Linux / UNIX bash shell aliases</p><pre>
$ unalias -a
</pre><p><strong>Note</strong><br /> When the computer is rebooted all alias will be lost.</p><p><em>How to prevent it?</em><br /> All alias must be added to .bashrc file located at your user folder (example: /home/saeid/.bashrc)</p><p><em>Example</em></p><pre>
$ gedit /home/saeid/.bashrc
</pre><p>paste:</p><pre>
alias clr='clear'
</pre><p>now you have to &#8216;compile&#8217; your .bashrc file</p><pre>
$ source .bashrc
</pre><p>Now clr alias it&#8217;s saved.</p><p>Good luck</p><div class="wp-biographia-container-top" style="background-color:#FFEAA8;"><div class="wp-biographia-pic"><img alt='' src='http://1.gravatar.com/avatar/1518e6b905d65cbe0a03243a199e18fc?s=100&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D100&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-biographia-text"><h3>About <a href="http://zebardast.ir/en/author/admin/" title="Saeid Zebardast">Saeid Zebardast</a></h3><p>I'm Senior software engineer with 5+ years of professional experience includes cross-platform proficiency with considerable knowledge of programming languages especially Java and programming paradigms such as OO and development methodologies. Also I'm MySQL DBA since 2006.</p><small><a href="mailto:&#115;&#97;e&#105;d.ze&#98;&#97;rd&#97;&#115;&#116;&#64;gmail&#46;&#99;&#111;&#109;" title="Send Saeid Zebardast Mail">Mail</a> | <a href="http://zebardast.ir/" title="Saeid Zebardast On The Web">Web</a> | <a href="https://twitter.com/#!/saeid" title="Saeid Zebardast On Twitter">Twitter</a> | <a href="https://www.facebook.com/saeid.zebardast" title="Saeid Zebardast On Facebook">Facebook</a> | <a href="http://www.linkedin.com/in/saeid" title="Saeid Zebardast On LinkedIn">LinkedIn</a> | <a href="https://plus.google.com/112638433061122581433" title="Saeid Zebardast On Google+">Google+</a> | <a href="http://zebardast.ir/en/author/admin/" title="More Posts By Saeid Zebardast">More Posts (31)</a></small></div></div><p><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Flinux-and-unix-bash-shell-aliases%2F&amp;linkname=Linux%20and%20UNIX%20bash%20shell%20aliases" title="Google+" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google+"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Flinux-and-unix-bash-shell-aliases%2F&amp;linkname=Linux%20and%20UNIX%20bash%20shell%20aliases" title="Facebook" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Flinux-and-unix-bash-shell-aliases%2F&amp;linkname=Linux%20and%20UNIX%20bash%20shell%20aliases" title="Twitter" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fzebardast.ir%2Fen%2Flinux-and-unix-bash-shell-aliases%2F&amp;title=Linux%20and%20UNIX%20bash%20shell%20aliases" id="wpa2a_2"><span style='display:none'>Share</span></a></p><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://zebardast.ir/en/linux-and-unix-bash-shell-aliases/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 8/12 queries in 0.002 seconds using disk: basic
Object Caching 646/650 objects using disk: basic

Served from: zebardast.ir @ 2012-05-22 01:29:24 -->
