Re: Can I create a link to an inode?

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

 



Words by Doug Wyatt [Fri, Aug 15, 2008 at 01:42:27PM -0500]:
>
> Jose Celestino wrote:
>> *This message was transferred with a trial version of CommuniGate(r) Pro*
>> Words by Doug Wyatt [Fri, Aug 15, 2008 at 05:47:55AM -0500]:
>>>
>>
>> There's a much easier way. Well, you don't really relink the inode but
>> copy the original file instead:
>>
>> 1. locate the open (deleted) file you want from the opening pid on /proc/$PID/fd/*
>> 2. cp /proc/$PID/fd/$FD somewhere
>>
>
> I think I read, somewhere, that in doing that I could end up
> with garbage bytes at the end of the last block in the copy,
> and would need to use the size from the original inode to
> trim the copied file.  Don't know if that's fact or not.
>

No. That's not true. Where have you read that?

> Also, by re-linking you preserve the mtime w/o hassling with
> touch.
>

Ok, that can be an advantage ...

> Re-linking the inode seems more elegant and satisfying after
> performing a klutzy move like deleting the wrong file.
>

... but relinking the file can be potentially dangerous (debugfs is) and
it is not guaranteed to work on all filesystems.

-- 
Jose Celestino | http://japc.uncovering.org/files/japc-pgpkey.asc
----------------------------------------------------------------
"One man’s theology is another man’s belly laugh." -- Robert A. Heinlein

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux