[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Konqueror to inform about hard links?
From:       Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date:       2008-08-29 19:31:27
Message-ID: g99iqf$dih$1 () ger ! gmane ! org
[Download RAW message or body]

macintoshzoom wrote:
> My clue and idea:
> Konqueror, via a plugin or the like, or enabling this feature somewhere 
> in a settings menu, could AT LEAST check for duplicate # inode numbered 
> files and mark them with a specific icon, similar as the soft links or so.

It *can't* check for duplicate inode, since they may not be in the same 
directory, or even visible (permissions, rebind mounts, NFS, etc). It 
can, and probably should, provide the link count, both *actual* count as 
a property, and probably some indication of files with link count > 1.

> And tools as kwikdisk, kdiskfree, kdirstat and the like must also inform 
> the user about this.

I don't see what kdiskfree has to do with hardlinks. I assume one of the 
others is a du-equivalent/frontend; I guess that could break out space 
consumed by multiple-link entries (e.g. 2.4 GB total, 18 MB used by 
files with >1 link count). (Though, as others have said, it's also a bug 
if they don't track inodes and avoid counting the same inode twice.)

> Question:
> If I delete one (from konqueror su) of this "duplicate hard linked" 
> files, will I get back my free space, will all the hard linked files 
> with the same # inode be deleted at the same time? Or Have i to delete 
> them one per one?

Nope, if you unlink something with link count > 1, all you've done is 
reduce the link count by 1. Space isn't reclaimed until the link/open 
count is 0. (Here it helps to understand the FS as being like a GC'd 
heap; when all the references go away, the memory can be reclaimed, but 
when only one of more-than-one references goes away, all you've done is 
reduce the reference count.)

-- 
Matthew
This message is non-smoking

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic