Re: [OT] Hardlinks and directories

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

 



On Friday 12 February 2010 04:07 PM, Patrick O'Callaghan wrote:
> On Fri, 2010-02-12 at 15:40 -0800, Suvayu Ali wrote:
>> On Friday 12 February 2010 09:19 AM, Mikkel wrote:
>>> On 02/12/2010 09:29 AM, Bruno Wolff III wrote:
>>>>
>>>> lsof would allow you to find the processes that have the files open. And then
>>>> you could kill those processes to release the space. It looks like you should
>>>> be able to get size infomation of these files from lsof as well. So one
>>>> could script looking for processes that have large files open.
>>>
>>> You might want to try using the +L1 and the -s options. It will
>>> display the sizes of unlinked (deleted) files.
>>>
>>> lsof +L1 -s
>>
>> I am not entirely clear about this part, how does one end up with an
>> un-named open file. To simulate the situation I tried to open a text
>> file with an editor and then removed it with rm. But it doesn't show up
>> in `lsof +L1' as I was expecting it to. Am I understanding this the
>> wrong way?
>
> Editors can do funny things with backup files in the interests of
> preserving your work. An easier test would be:
>
> cat>  foo&
> rm foo
> lsof +L1 -s
>
> When I do this the "cat" process shows up (and foo is marked as
> deleted). You can then reconnect to "cat" (using fg) and write stuff
> into the "non-existent" file.

Yes! worked wonderfully. Also when I tried `cat foo' while it was 
backgrounded, cat complained "No such file or directory". Which is 
exactly what we would expect. :)

>
> poc
>

Thank you everyone for all the responses. Can't help but admire with awe 
at the collective knowledge/wisdom of the list. ;)
-- 
Suvayu

Open source is the future. It sets us free.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[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