Results 1 to 4 of 4

Thread: How to create an alias for a directory in Unix

  1. #1
    Join Date
    Nov 2008
    Posts
    1,259

    How to create an alias for a directory in Unix

    I am beginner for Unix and Linux

    I would like to create an alias for UGL directory in UNIX
    /datadev/appdev/devappl/ugl/11.5.0/

    when I type
    Code:
    cd $ UGL
    it is positioned directly in
    /datadev/appdev/devappl/ugl/11.5.0/

  2. #2
    Join Date
    May 2008
    Posts
    188

    Re: How to create an alias for a directory in Unix

    you ln command with the -s option.

    Code:
    ln -s /path/physical/path/shortcuts

  3. #3
    Join Date
    Apr 2008
    Posts
    3,339

    Re: How to create an alias for a directory in Unix

    To create permanent aliases to your shell, you must edit the file .bashrc which is at the root of your home and add the definition of the alias like this:

    Code:
    #nano /home/ton_user/.bashrc
    
    # Define the alias 
    alias al='ls -al'
    To be considered, you must relog. Now when you type "al" in your shell, it executes the command "ls-al".

  4. #4
    Join Date
    May 2008
    Posts
    3,516

    Re: How to create an alias for a directory in Unix

    Otherwise, just a
    Code:
    export UGL=/datadev/appdev/devappl/ugl/11.5.0/
    will do (in bash), but this is not an "alias", just an environment variable.

Similar Threads

  1. Mapping directory on UNIX server to drive on Windows 2008 box
    By v_komarov in forum Windows Server Help
    Replies: 2
    Last Post: 29-09-2011, 03:17 AM
  2. How to create directory in ASP.net
    By Aspen in forum Software Development
    Replies: 3
    Last Post: 11-11-2009, 12:01 PM
  3. Exchange will not create a new mailbox or alias
    By pmela in forum Small Business Server
    Replies: 4
    Last Post: 02-11-2009, 06:11 AM
  4. How to create many profile/alias with only one Email ID?
    By Alkesh jain in forum Technology & Internet
    Replies: 3
    Last Post: 02-03-2009, 01:04 PM
  5. Create Symbolic Link in Unix or Linux
    By DANIEL 602 in forum Tips & Tweaks
    Replies: 1
    Last Post: 02-12-2008, 12:38 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,253,186.43359 seconds with 16 queries