Re: simple ln question

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

 



<snip)
> Anyway, sometimes I want to undo what I did, but I can't say
>
>      unlink file2
>
> because that will remove file2.  I just want it , so that the files are
> still the same but if I change one, the other will
> not change (i.e., inodes are different but diff shows no differences).  I
> can't see any flags for ln.  Anyone have
> any idea?
<snip>
All I can think of would be using the cp command to copy it to a new
file.  You cannot separate the hard links into individual files (not
that I know of) because they are one and the same.  So you have to
create a new file at a new inode, hence the cp command.

> another question.  If you have a file  FILE1 can you find everything that is
> linked
> to it?  say you have
>
>      ln -s /this/is/filesystem/1/FILE1  /filesystem/2/FILE2
>
The find command can search your system for files with the same inode
(hence hard link) ask it to search your system for all files that have
a symbolic link to file1.  And of course being the find command you
can expand or restrict your search path and depth of search as you
require/desire.

Jacques B.


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

  Powered by Linux