Many things. An open file descriptor refers to the inode.

On Mon, Mar 30, 2020 at 10:18 AM aitor_czr <aitor_...@gnuinos.org> wrote:

> Hi,
> On 30/3/20 15:46, Simon Hobson wrote:
>
> Hendrik Boom <hend...@topoi.pooq.com> <hend...@topoi.pooq.com> 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@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>


-- 
Bruce Perens - General Partner, Incubator.Fund, Partner, OSS.Capital.
_______________________________________________
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to