Linux下的僵尸文件

Linux下的僵尸文件

尝试从 Linux 机器上卸载 cups 时,遗留了某种“schrödingers 文件”:ls 显示它,但除此之外它不存在。系统是 ubuntu 17.10 / kernel 4.13,文件系统是 2 个设备上的 BTRFS raid1。以下是显示问题的 shell 代码片段:

root@kiney-desktop /root $ apt-get purge cups-daemon -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libarmadillo6 libdap17v5 libgdal1i libhdf5-10 liblwgeom-2.1.8 libossp-uuid16 libpoppler58 libproj9 libsane-hpaio libsuperlu4 python3-reportlab python3-reportlab-accel
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  cups-daemon*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 965513 files and directories currently installed.)
Purging configuration files for cups-daemon (2.2.4-7ubuntu3.1) ...
rm: cannot remove '/var/cache/cups': Directory not empty
dpkg: error processing package cups-daemon (--purge):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 cups-daemon
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@kiney-desktop /root $ cd /var/cache/cups/
root@kiney-desktop /var/cache/cups $ ls -lsha
ls: cannot access 'job.cache': No such file or directory
total 0
0 drwxrwx--- 1 root lp    18 Aug 14 19:39 .
0 drwxr-xr-x 1 root root 514 Jan 26  2018 ..
? -????????? ? ?    ?      ?            ? job.cache
root@kiney-desktop /var/cache/cups $ rm job.cache 
rm: cannot remove 'job.cache': No such file or directory
root@kiney-desktop /var/cache/cups $ stat job.cache 
stat: cannot stat 'job.cache': No such file or directory

/var/cache/cups 上的“ls”显示文件 job.cache,但没有更多信息,只有问号。我无法删除或统计该文件。在尝试删除 cups 之前,我有文件系统的只读 BTRFS 快照,它们以相同的方式显示文件。那么这里发生了什么?这是一个错误吗?

相关内容