作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在 python 上开发 fuse fs(使用 fuse-python 绑定(bind))。我需要什么方法才能使 touch 正常工作?目前我有下一个输出:
$ touch m/My\ files/d3elete1.me
touch: setting times of `m/My files/d3elete1.me': Invalid argument
File exists "d3elete1.me":
$ ls -l m/My\ files/d3elete1.me
-rw-rw-rw- 1 root root 0 Jul 28 15:28 m/My files/d3elete1.me
我还试图跟踪系统调用:
$ strace touch m/My\ files/d3elete1.me
...
open("m/My files/d3elete1.me", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK|O_LARGEFILE, 0666) = 3
dup2(3, 0) = 0
close(3) = 0
utimensat(0, NULL, NULL, 0) = -1 EINVAL (Invalid argument)
close(0) = 0
...
如您所见,utimensat 失败。我试图实现空的 utimens 和 utime 但它甚至没有被调用。
最佳答案
尝试使用 -f 选项启动 fuse 。 Fuse 将保留在前台,您可以在控制台中看到错误。
关于python - fuse utimensat 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3352872/
我正在 python 上开发 fuse fs(使用 fuse-python 绑定(bind))。我需要什么方法才能使 touch 正常工作?目前我有下一个输出: $ touch m/My\ files
我是一名优秀的程序员,十分优秀!