pavement

Alias (command)

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(minor updates)
m (Reverted edits by DavidYoung (talk) to last revision by 173.165.130.129)
 
Line 52: Line 52:
  
 
[[Category : System Commands]]
 
[[Category : System Commands]]
 
== 10 Keys to Happier Living ==
 
 
Action for Happiness has developed the 10 Keys to Happier Living based on a review of the latest scientific research relating to happiness. Everyones path to happiness is different, but the research suggests these Ten Keys consistently tend to have a positive impact on peoples overall happiness and well-being.
 
 
[[http://goodvillenews.com/10-Keys-to-Happier-Living-vxnwik.html 10 Keys to Happier Living]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== The Story of Change ==
 
 
"Ive come to see that we have two parts to ourselves; its almost like two muscles -- a consumer muscle and a citizen muscle. Our consumer muscle, which is fed and exercised constantly, has grown strong: So strong that "consumer" has become our primary identity, our reason for being. Were told so often that were a nation of consumers that we dont blink when the media use "consumer" and "person" interchangeably."
 
 
[[http://goodvillenews.com/The-Story-of-Change-hgReTV.html The Story of Change]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== 3 Things You Can Say to Someone Who Does Not Like You ==
 
 
I do my thing and you do your thing. I am not in this world to live up to your expectations, and you are not in this world to live up to mine. You are you, and I am I, and if by chance we find each other, its beautiful. If not, it cant be helped. Fritz Perls
 
 
[[http://goodvillenews.com/3-Things-You-Can-Say-to-Someone-Who-Does-Not-Like-You-HGymRj.html 3 Things You Can Say to Someone Who Does Not Like You]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== New Toilet System Transform Waste into Electricity ==
 
 
Scientists from Nanyang Technological University (NTU) have invented a new toilet system that will turn human waste into electricity and fertilisers and also reduce the amount of water needed for flushing by up to 90 per cent compared to current toilet systems in Singapore.
 
 
[[http://goodvillenews.com/New-Toilet-System-Transform-Waste-into-Electricity-zvQBzk.html New Toilet System Transform Waste into Electricity]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== Bangladesh rickshaw puller starts clinic for the poor ==
 
 
Joynal Abedin still remembers the rainy and windy night when he saw his father die because there was no medical treatment. His village in the northern Mymensingh district of Bangladesh did not have any medical facility at that time, and the nearest hospital was about 20km (12 miles) away.
 
 
[[http://goodvillenews.com/Bangladesh-rickshaw-puller-starts-clinic-for-the-poor-0zbEXF.html Bangladesh rickshaw puller starts clinic for the poor]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 

Latest revision as of 17:27, 25 August 2012

The alias command is used to create aliases, and to get a list of aliased commands.

[edit] Aliases creation

The syntax is shell dependent:

B-Shell (sh, bash) and Z-Shell (zsh) :

alias l=ls
alias la='ls -A'

C-Shell (csh, tcsh) :

alias l ls
alias la 'ls -A'

[edit] Special functions

Some shells provide additional features, such as the -g argument of zsh's alias built-in command. This allow creation of global aliases :

> alias a=aaa
> alias -g b=bbb
> echo a b
a bbb

This can be very useful :

> alias -g ...='../..'
> pwd
/foo/bar/misc
> cd ...
> pwd
/foo

For more information on the specific options of your shell, check its man page.

[edit] Aliases consultation

You can use this to get a list of existing aliases:

> alias
...=../..
....=../../..
.....=../../../..
......=../../../../..
.......=../../../../../..
clean='rm -f `find . -name "*~" -o -name ".*~" -o -name ".*.core" -o -name "*.core" -o -name "#*#" -o -name "a.out"`
close='cdcontrol -f /dev/cd0 close'
eject='cdcontrol -f /dev/cd0 eject'
fr='export LANG=fr_FR.ISO8859-15'
la='ls -a'
ll='ls -Al'
ls='ls -FG'
> alias ls
ls='ls -FG'

See also: unalias, which

Personal tools