File LinksFor convenience, you can create a symbolic link in your account which points to a file in a different location. This would be useful if you wanted view or edit a file in a different location, but didn't want to specify the full path. For example, let's say you had the following two directory structures in your account: 1994 1995 April April 15 15 total total If you were viewing the file called total under the 1994 directory, and decided you wanted to view the file called total under 1995, you would have to type:
Or, you could create a link called total95 in the 1994 directory which points to the file called total under the 1995 directory. To create a symbolic link, type: ln -s <existing_file> <link_name> Using the above example, from your home directory, you would type:
This example will create a link called total95 under the 1994 directory stucture which points to the file called total under the 1995 directory structure. You could then easily edit and view the total file in the 1995 directory from the 1994 directory by typing:
Directory LinksYou can create a symbolic link in your account which points to a directory in a different location. This would be useful if you wanted to change to a directory in a different location but didn't want to specify the full path. For example, let's say you constantly change to the following directory by typing:
Instead of typing in the full path everytime you wanted to change to this directory, you could create a link in your account called itpprog1 which points to the above directory. To create a symbolic link, type: ln -s <existing_directory> <link_name> Using the above example, from your home directory, you would type:
This example will create a link called itpprog1 in your home directory which points to the prog1 subdirectory in the <itp101> account. You could then easily change to the prog1 subdirectory in the <itp101> account from your home directory by typing:
For more information on links, type man ln at the UNIX prompt. Last Updated: Friday, June 02, 2006 at 12:07PM PDT |



