Re: Tar and hard links.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It would appear that on May 1, Sean Estabrooks did say:

> A hard link is just a directory entry.   When a file is first created it
> has one "hard-link".  That is, it has a single directory entry.   When you
>  create a new "hard link" you're just creating another directory entry 
> that points to the file.
> 
> Hard links are indistinguishable from the original file.  Once you've hard
> linked a file there is no way for the system to determine which is the
> original directory entry  and which is the directory entry you
> created with the ln command.
<snip>
> It handles them as regular files.


Pardon my intrusion Sean, But you sound knowledgeable on hard links and I
did something silly while trying to get dvd::rip working...
I wanted to use a dev reference I could remember better than the way FC1
decided my ide cd-rw is /dev/cdrom1 (a softlink to /dev/scd0) so I wanted
to do an 
# ln -s /dev/scd0 /dev/cd-rw
But I had two typos, 
A) left out the -s making a hard link 
B) fatfingered the cd-rw into cd-0rw 
# ln /dev/scd0 /dev/cd-0rw
But when I went to fix the typo by deleting the link
# rm /dev/cd-0rw 
I get "rm: remove block special file `cd-0rw'?" Now normally I'd be
confident that as long as cd-0rw wasn't the *last* hard link... I should
be able to safely delete it. But with block special files that I don't
know how to recreate properely... Well lets just say I wasn't sure
enough...

Can you confirm that as long as it's not the *last* hard link then that
warning message doesn't matter???

By the way about your answer to the OP... If tar can't tell the
difference between two hard links to the same file, and treats both of
them as regular files, would that mean that in the case of an actual
"tape" archive  that included both links, there would two complete
copies of the file??? 

-- 
|      ?           ?		
|			
|        -=-   -=-	 I'm NOT clueless...    	
|        <?>   <?>    	But I just don't know.  	
|            ^          Joe (theWordy) Philbrook           
|           ---  	     J(tWdy)P
|			  <jtwdyp@xxxxxxxx> 
|      ?           ?		



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux