LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-13-2012, 03:56 AM   #1
rajini23
Member
 
Registered: Sep 2011
Posts: 162

Rep: Reputation: Disabled
Unhappy wants to create the hardlink


Hi,

I wants to create the hardlink in one of my Linux machine.
wants to create the hardlink in different partitions,
previously some of the files are linked same way.

I wants to add more hardlink but i am getting the error...
Please help me on this....
 
Old 04-13-2012, 04:01 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you can't have a hard link across different partitions, you'd need a symlink instead. every normal file already IS a hard link, and I'm sure it doesn't make sense to you to have that one file *name* on one disk yet the data on the other... it makes no sense with 1 link or 50, they are all equally connected directly to the data on the disk, not the other names.

Background reading on what a hard link actually is may help you understand why it's not possible - http://en.wikipedia.org/wiki/Hard_link

Last edited by acid_kewpie; 04-13-2012 at 04:03 AM.
 
Old 04-13-2012, 04:33 AM   #3
rajini23
Member
 
Registered: Sep 2011
Posts: 162

Original Poster
Rep: Reputation: Disabled
But some file are made hard link in different partition in my Linux machine,
in /opt to /home they have made the link i checked the "inode" number same number i can see in that both partitions...
can you suggest how they have made such links.....

we use rhel4 OS.....
 
Old 04-13-2012, 04:46 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,840

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
inode works only within the partition. So you can have the same inode number on several partitions, but they will be different files. There is no exception.

Hard link means you have more (than one) directory entry to the same inode, to the same filesystem object. In this case we used to say those entries are hard linked to each other, but would be better to say they are all points to the same file. A symbolic link is an arbitrary string which is evaluated as "use that file", this string is a path to the real file in another directory. This path may or may not be valid, may direct you to another filesystem or another host or whatever you want. The symbolic link is an entry in the directory and does not belong an inode to it.
 
  


Reply



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
/etc/resolv.conf hardlink kbscores Linux - Newbie 1 10-05-2011 12:39 PM
Difference between Hardlink Vs Copy barunparichha Linux - Software 7 04-08-2010 11:43 AM
getting hardlink for Thunderbird to work gravity-1 Linux - Newbie 3 03-07-2005 04:11 PM
Is hardlink support on Jffs FS? alice95089 Linux - Software 0 02-17-2005 10:11 PM
Hardlink shivanandbg Linux - General 1 04-27-2004 10:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:33 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