LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-10-2003, 02:45 PM   #1
Zog_dev
LQ Newbie
 
Registered: Aug 2003
Location: Manchester UK
Distribution: Cobalt RaQ550
Posts: 1

Rep: Reputation: 0
Talking What is a symlink and how do I create one.


Hi --

I am a Linux newbe and I am trying to install ColdFusion MX on a Cobalt Raq550. While reading the lists I have come across references to symlinks. What are they and how do I make one?

Thanks
David

As an aside if anyone out there has sucessfully installed CFMX or CFMX 6.1 on a Sun/Cobalt RaQ550 any hints wold be most welcome!
 
Old 09-10-2003, 03:07 PM   #2
Mad Merlin
Member
 
Registered: Aug 2003
Location: Approximately here.
Distribution: Mandrake 9.1
Posts: 86

Rep: Reputation: 15
ln -s <target> <symlink name>

You'll probably want to read the man pages also:

man ln

But basically, a symlink is an object that points to another object, so that when you access the object, you can be directed to the target of the symlink. Symlinks are similar in concept to "shortcuts" in Windows, but are more functional in that they can be dereferenced by programs also.
 
Old 09-10-2003, 03:08 PM   #3
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 47
Links
Links are pointers between files. With links, you can have files exist in many locations and be accessible by many names. There are two types of links: hard and soft.
Hard links are names for a particular file. They can only exist within a single directory and are only removed when the real name is removed from the system. These are useful in some cases, but many users find the soft link to be more versatile.

The soft link, also called a symbolic link, can point to a file outside of its directory. It is actually a small file containing the information it needs. You can add and remove soft links without affecting the actual file.
Links do not have their own set of permissions or ownerships, but instead reflect those of the file they point to. Here is a common example:

Code:
$ ls -l /bin/sh
   lrwxrwxrwx   1 root     root     4 Apr  6 12:34 /bin/sh -> bash
The -s option tells ln to make a symbolic link. The next option is the target of the link, and the final option is what to call the link. In this case, it will just make a file called mp3 in your home directory that points to /var/media/mp3. You can call the link itself whatever you want by just changing the last option.

Making a hard link is just as simple. All you have to do is leave off the -s option. Making a hard link out of the previous command would be done as follows:
Code:
$ ln /var/media/mp3 ~/mp3

Last edited by 320mb; 09-10-2003 at 03:09 PM.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Symlink Fredde87 Linux - General 14 09-30-2005 08:06 PM
udev takes long time to create /dev/usbhd symlink Yalla-One Slackware 4 04-04-2005 03:27 AM
where is symlink? guitarfella Slackware 3 12-04-2004 07:34 AM
symlink evannextel Linux - Newbie 1 09-17-2003 03:54 PM
create symlink with an option,e.g. gunzip & gzip,how? l_9_l Linux - General 1 05-15-2002 03:59 AM


All times are GMT -5. The time now is 11:33 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration