リナックス linux 入門 初心者 コマンド

リナックス  linux  コマンド の情報満載です。 探しているlinux リナックス  コマンド はこちらです。


alias  コマンドの別名を登録する

 構文  
$ alias 別名='本来のコマンド'


≪aliasコマンド 説明   ≫

コマンドなどを

別名として登録する。



なお、aliasコマンドのオプションを省略し

alias コマンドを実行した場合は

現在登録してある別名をすべて表示します。

[takuan@localhost ~]$ alias
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'


もしくわ  オプション-pでもリストが表示されます。


[takuan@localhost ~]$ alias -p
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'



また,nameのみ指定した場合は,指定した別名についての登録状況を表示する。

[takuan@localhost ~]$ alias l.
alias l.='ls -d .* --color=auto'




       alias [-p] [name[=value] ...]
              Alias  with  no  arguments or with the -p option prints the list of
              aliases in the form alias  name=value  on  standard  output.   When
              arguments  are  supplied,  an  alias is defined for each name whose
              value is given.  A trailing space in  value causes the next word to
              be  checked for alias substitution when the alias is expanded.  For
              each name in the argument list for which no value is supplied,  the
              name  and value of the alias is printed.  Alias returns true unless
              a name is given for which no alias has been defined.


 使用例  

[takuan@localhost ~]$ alias la='ls -la'
[takuan@localhost ~]$ la
合計 28
drwx------ 4 takuan takuan 4096 2009-08-23 07:17 .
drwxr-xr-x 6 root   root   4096 2009-08-23 07:17 ..
-rw-r--r-- 1 takuan takuan   18 2008-02-29 23:27 .bash_logout
-rw-r--r-- 1 takuan takuan  176 2008-02-29 23:27 .bash_profile
-rw-r--r-- 1 takuan takuan  124 2008-02-29 23:27 .bashrc
drwxr-xr-x 2 takuan takuan 4096 2008-04-07 05:43 .gnome2
drwxr-xr-x 4 takuan takuan 4096 2009-08-20 22:18 .mozilla
[takuan@localhost ~]$ alias la
alias la='ls -la'

「この記事は役に立ちました。」という場合には
ブログランキングボタンをクリックしていただけると大変、助かります。

ブログランキング

blogram投票ボタン


トラックバック(0)

このブログ記事を参照しているブログ一覧: リナックス コマンド alias  コマンドの別名を登録する

このブログ記事に対するトラックバックURL: http://websky21.com/MT/mt-tb.cgi/826

Linuxコマンド一覧

ブックマークに追加

RSSフィード登録

ボタン をクリックするだけで RSSフィードを登録できます。 非常に便利で簡単に登録できてオススメです!

ATOM RSS

Bloglinesで閲読登録

ADD TO Hatena::RSS

Subscribe with livedoor Reader

Add to Google

goo RSSリーダーに追加

My Yahoo!に追加

フィードメーター - リナックス linux 入門   初心者 コマンド

リナックス 掲示板


2010年10月

          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
  RANKING⇒ banner_14.gif

RANKING⇒
RANKING⇒ blogram投票ボタン