LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-14-2011, 02:30 PM   #16
kienlarsen
Member
 
Registered: Apr 2011
Posts: 76

Original Poster
Rep: Reputation: 0

T3RM1NVT0R,
thank for the post and for the links. That is why I started with a statement that I'm confused about my assumptions.
 
Old 05-14-2011, 02:35 PM   #17
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Am glad that you got what you were looking for. Enjoy Linux!!!
 
Old 05-14-2011, 10:49 PM   #18
lodragan
LQ Newbie
 
Registered: Jan 2006
Location: USA
Distribution: Slackware 13.1, Windows 7 (on game box only), Mac OSX
Posts: 18

Rep: Reputation: 4
One bit of advice from my own experiences on Unix and Linux: do not use hard links; only use symlinks...they do what you want, and have the following advantages -

1. They clearly show you that they are links; no confusion or searching to find which files are linked or not.

2. Symlinks can cross disk partition boundaries; hard links can not cross partition boundaries on multi partitioned disks or multi disk systems.

I have never found a specific reason to use hard links over symlinks in 17 years...ever. There may be some niche use - but I have yet to find it (I'm sure someone here will point it out to me )

It should also be instructive to observe what distros do when they build their links for various configurations - I have yet to see hard links used.
 
Old 05-15-2011, 01:30 AM   #19
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by lodragan View Post
I have never found a specific reason to use hard links over symlinks in 17 years...ever. There may be some niche use - but I have yet to find it (I'm sure someone here will point it out to me )
The classic use is an executable that behaves differently depending on which name it is called by. This is useful when much of the coding is the same. For example perlbug and perlthanks are links to the same file.

For an application-land example of the usefulness of hard links, we have a searchable archive of files copied from users' computers. Many files are duplicated, sometimes many times, with different names and different directories which convey information about them. For example a file may be called 2-Mar-2010.odt and be in directories "My Documents/" and "Working Groups/Water/Minutes/". Keeping a single copy of the file with a hard link for each of its directory/name combinations saves a lot of file system space while preserving useful information.
 
Old 05-16-2011, 10:17 AM   #20
kienlarsen
Member
 
Registered: Apr 2011
Posts: 76

Original Poster
Rep: Reputation: 0
catkit,

what happens if two users are trying editing of a specific file at a same time? I mean one opens one hard link to it... what happens to another? Will it be blocked from editing file until first user closes it?
 
  


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
trying to delete data from a file with php steve51184 Linux - Server 5 04-28-2011 03:20 AM
How to create disk image of actual data the_gripmaster Linux - General 6 11-16-2010 04:48 PM
virtualbox - does this delete my actual drive micro_xii Linux - Newbie 5 11-07-2007 05:58 PM
Reading audio data files as an actual audio file? Erik_the_Red Linux - Software 1 06-01-2005 08:22 AM
How to delete hda1 data & File system gardenair Linux - Newbie 1 03-25-2005 09:00 AM


All times are GMT -5. The time now is 08:42 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration