:: Re: [DNG] What to do with an inode?
Top Page
Delete this message
Reply to this message
Author: aitor_czr
To: dng
Subject: Re: [DNG] What to do with an inode?

On 30/3/20 15:46, Simon Hobson wrote:
> Hendrik Boom<hendrik@???> wrote:
>> On Mon, Mar 30, 2020 at 03:18:45PM +0000, aitor_czr wrote:
>>> $ ls --inode --directory "/"
>>> 2 /
>> Is there anything I can do with an inode except check file identity within
>> a filesystem?
> You can use it as a search condition for find using '-inum n'
> Other than that, my quick search suggested there aren't any useful things you can do with it - or at least nothing that's not easier to do by just looking up a name for it and working with a normal directory entry.
> I did see some search results related to file with no directory entry, but the inode staying in existence due to the file being open. As in, "I want to create a directory entry pointing to a specific inode to rescue the file so it doesn't disappear when closed". I didn't actually look at any of these though.
> Simon

As far as i know, it's not possible to interact with the file directly
via inode for a very good reason:
it would be a way to slip through the directory permissions as you
traverse the full pathname's hierarchy
tree upstream to the given file.