skip to main | skip to sidebar

OPEN SOURCE

Linux for Better life

  • Home
  • Trik-Tips
  • Free Template
  • Blogger Hack
  • Free Ebook
Showing posts with label application. Show all posts
Showing posts with label application. Show all posts

UNIX and LINUX part 12


Tracked aliases
Tracked aliases are not true aliases. A tracked alias is the actual command name and the full pathname used to access an existing command. It is called tracked alias because the path is aliased for the command name and the new alias tracks directly to the command. This keeps the shell from having to search the entire PATH for a command, thus providing faster command execution.
You can turn command tracking on by using the set command. Type
cj> set -o trackall

to inform the shell to track all commands issued to it. For example, the following sequence of commands illustrates the automatic tracking of commands.
cj> set -o trackall
cj> alias ls # list alias of ls command
ls alias not found # no alias exists for ls
cj> ls # execute the ls command
...
cj> alias ls # list alias of ls command
ls=/bin/ls # tracked alias has been set to full path

You can track individual commands by using the -t option. For example,
cj> alias -t ls

would cause the same results as the above steps. But the shell would not automatically set every command you issue to a tracked alias.
RETURN CODES
Alias returns a zero (true) unless a name is given that has not been set to a string.
APPLICATIONS
The alias command is used to create shorthand versions of longer commands. It is very useful for hard-to-remember commands and for those commands you use repeatedly throughout the day. Remember to place your aliases in your .profile or your ENV file (.kshrc) so they are set each time you log in.
The unalias command is used to remove previously set aliases.
TYPICAL OPERATION
In this activity you use the alias command to create various aliases. Begin at the shell prompt.
1. Type alias "I= -F" and press Return.
C Shell
Type alias I "Is -F" and press Return.
2. Now try your new command by typing I and pressing Return. Notice the output of your l command is a multicolumn list with the executable (*) and directory (/) files being flagged.
3. List all aliases you have set by typing alias and pressing Return.
In this activity you use the unalias command to remove the previously defined l alias command. Begin at the shell prompt.
1. Remove the l alias by typing unalias I and pressing Return.
2. Type alias I and press Return to list out your l alias. Notice the l alias is no longer defined.
3. Turn to Module 64 to continue the learning sequence.

Posted by MALIK

Labels: alias, application, code, command, linux, path, unix

Older Posts Home

Links

  • ALJAZEERA TV
  • ANTARA
  • Bali`s Blogger
  • BBC
  • BERITANET.COM
  • CHIP ONLINE
  • CNN
  • DETIK.COM
  • E-BOOK
  • Economic
  • Friends
  • Friendster's Blog
  • Habibieafsyah
  • HARVARD UNIVERSITY
  • ILMU KOMPUTER
  • INFO LINUX
  • KICK ANDY
  • LINUX OpenSuse
  • LINUX SLAX
  • Linux Temanggung
  • LINUX UBUNTU
  • LIPUTAN 6 SCTV
  • MASTER BLOGGER
  • METROTV NEWS
  • MUSIC DOWNLOAD
  • My Class
  • Robotic AMIKOM
  • SMA N 3 TEMANGGUNG
  • SMART E-LEARNING
  • SOFTPEDIA
  • STMIK AMIKOM
  • SUPPORTED BLOGGER
  • TIPS TRICKS
  • TRIAL FILM
  • TV ONE ONLINE

Blog Archive

  • ▼ 2009 (38)
    • ▼ 05/31 - 06/07 (1)
      • Java
    • ► 02/15 - 02/22 (1)
    • ► 01/11 - 01/18 (11)
    • ► 01/04 - 01/11 (25)
  • ► 2008 (70)
    • ► 11/30 - 12/07 (22)
    • ► 11/16 - 11/23 (18)
    • ► 11/09 - 11/16 (1)
    • ► 10/26 - 11/02 (5)
    • ► 10/19 - 10/26 (16)
    • ► 10/12 - 10/19 (4)
    • ► 10/05 - 10/12 (4)



$100.00 Anda pasti untung setelah registrasi!






Search Engine Optimization and SEO Tools







Bookmark CO.CC:Free Domain