:: Re: [DNG] What to do with an inode?
Forside
Slet denne besked
Besvar denne besked
Skribent: Bruce Perens
Dato:  
Til: aitor_czr
CC: dng
Emne: Re: [DNG] What to do with an inode?
Many things. An open file descriptor refers to the inode.


On Mon, Mar 30, 2020 at 10:18 AM aitor_czr <aitor_czr@???> wrote:

> Hi,
> On 30/3/20 15:46, Simon Hobson wrote:
>
> Hendrik Boom <hendrik@???> <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.
>
> Cheers,
>
> Aitor.
>
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>



--
Bruce Perens - General Partner, Incubator.Fund, Partner, OSS.Capital.