Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-13-2004, 03:14 PM   #1
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Question Soft vs. Hard Links

I've been reading about the ln command, and I'm a little confused. Is there any reason you'd ever want to create a symlink instead of a hard link if the two files are on the same filesystem? It seems to me that the only reason a symlink would be better is if a hard link wouldn't work in a particular situation.

Old 06-13-2004, 03:29 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
Let's say that a hard link doesn't show up as a link
in ls ... you're running the risk of deleting a file
because it has two different names in different
places, both have a "normal" size, none of them
indicates (other than the number of links you'll
see in ls) that it may be a link ;) But if you're used
to looking at that value you probably won't have
that problem.

Personally I just like things like

 ls -l /dev/cdrom 
lrwxrwxrwx    1 root     root            9 2004-03-17 13:41 /dev/cdrom -> /dev/scd0


Last edited by Tinkster; 06-13-2004 at 04:59 PM.
Old 06-13-2004, 03:41 PM   #3
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Ok, now that makes sense. Thanks!


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
links (hard links and soft links..) sachitha Programming 1 08-10-2005 01:10 PM
Soft Links varunbihani Linux - Newbie 3 06-05-2005 12:42 AM
Hard/Soft Links nodger Linux - General 1 05-15-2004 11:36 AM
Soft Links tonphi Red Hat 1 09-22-2003 10:20 PM
Soft Links Resqtech Linux - Newbie 4 08-26-2001 11:00 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:45 PM.

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