LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2004, 06:51 AM   #1
gubak
Member
 
Registered: Jul 2004
Posts: 332

Rep: Reputation: 30
Make symbolic link or alias


How can I make a symbolic links or aliases which are point to another location?

Last edited by gubak; 10-20-2006 at 06:41 AM.
 
Old 08-20-2004, 06:55 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
ln -s for symbolic link

you can use the alias command to create aliases

e.g.
alias cp="cp -v "
 
Old 08-20-2004, 09:39 AM   #3
guzzi
Member
 
Registered: Jun 2004
Location: Lawrence, KS
Distribution: Slackware
Posts: 315

Rep: Reputation: 42
symlink

This may be of some help.

Lets say you are in your home directory and want to create a file which is really somewhere else. Lets use /etc/inittab as a test.

ln -s give_it_a_name_file /etc/inittab

This will make a file named give_it_a_name_file in your home directory that is really a link to /etc/inittab

Good Luck
 
Old 08-20-2004, 09:54 AM   #4
barisdemiray
Member
 
Registered: Sep 2003
Location: Ankara/Turkey
Distribution: Slackware
Posts: 155

Rep: Reputation: 30
Re: symlink

Quote:
Originally posted by guzzi
This may be of some help.

Lets say you are in your home directory and want to create a file which is really somewhere else. Lets use /etc/inittab as a test.

ln -s give_it_a_name_file /etc/inittab

This will make a file named give_it_a_name_file in your home directory that is really a link to /etc/inittab

Good Luck
No, this will make an error :-)

Code:
[baris@rhinox]$ ln --help
Usage: ln [OPTION]... TARGET [LINK_NAME]
...
correct form is

Code:
ln -s /etc/inittab give_it_a_name_file
 
Old 08-20-2004, 10:10 AM   #5
guzzi
Member
 
Registered: Jun 2004
Location: Lawrence, KS
Distribution: Slackware
Posts: 315

Rep: Reputation: 42
you are right and I am ?

what I should have shown is

ln -s /etc/inittab give_it_a_name

next time I will engage brain before posting.

Thanks for getting me organized.
 
Old 08-20-2004, 12:50 PM   #6
FarAway
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Rep: Reputation: 0
if you wanna make an alias permanently, you can add a line (eg. alias cp="cp -i") into the file ~/.bashrc

hope that helps. ^_^
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot make symbolic link dave`2005 Debian 3 10-08-2005 10:15 AM
Is it possible to make a dir a symbolic link? dr_zayus69 Linux - General 4 03-09-2005 08:48 AM
how do i make DVD symbolic link permanent? RU63 Debian 4 12-28-2004 02:07 PM
How do I make symbolic link with midnight commander? akihandyman Linux - Newbie 1 02-17-2004 07:16 PM
How to make symbolic link? Tommi Linux - General 9 05-07-2003 08:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration