gpt4 book ai didi

linux - 什么是 Linux 中的匿名 inode?

转载 作者:IT王子 更新时间:2023-10-29 00:18:22 25 4
gpt4 key购买 nike

我在 google 上搜索了“anonymous inode”,它似乎与 epoll 有关……但它到底是什么?

最佳答案

至少在某些情况下,匿名 inode 是没有附加目录条目的 inode。创建此类 inode 的最简单方法如下:

int fd = open( "/tmp/file", O_CREAT | O_RDWR, 0666 );
unlink( "/tmp/file" );
// Note that the descriptor fd now points to an inode that has no filesystem entry; you
// can still write to it, fstat() it, etc. but you can't find it in the filesystem.

关于linux - 什么是 Linux 中的匿名 inode?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4508998/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com