ルートとしてディレクトリを削除できません

ルートとしてディレクトリを削除できません

ルートとしてもディレクトリを削除することはできません。このコマンドはrm -rf kdyiyv.pif 何も返しません。その後、コマンドを試しましたが、touch kdyiyv.pifエラーが発生しました。touch: setting times of 'kdyiyv.pif/': Input/output error

私も頑張りましたが、 strace rm -rf kdyiyv.pif

「strace」の出力は次のようになります。

execve("/bin/rm", ["rm", "-rf", "/media/Kira/kdyiyv.pif"], [/* 38 vars */]) = 0
brk(0)                                  = 0x8f2f000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7786000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=53732, ...}) = 0
mmap2(NULL, 53732, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7778000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@n\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1421892, ...}) = 0
mmap2(NULL, 1431976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x110000
mprotect(0x267000, 4096, PROT_NONE)     = 0
mmap2(0x268000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x157) = 0x268000
mmap2(0x26b000, 10664, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x26b000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7777000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb77778d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0x268000, 8192, PROT_READ)     = 0
mprotect(0x8053000, 4096, PROT_READ)    = 0
mprotect(0xb86000, 4096, PROT_READ)     = 0
munmap(0xb7778000, 53732)               = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8580848, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7577000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x82e) = 0xb7785000
brk(0)                                  = 0x8f2f000
brk(0x8f50000)                          = 0x8f50000
close(3)                                = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
lstat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fstatat64(AT_FDCWD, "/media/Kira/kdyiyv.pif", {st_mode=S_IFDIR|0700, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(AT_FDCWD, "/media/Kira/kdyiyv.pif", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_mode=S_IFDIR|0700, st_size=0, ...}) = 0
fcntl64(3, F_GETFL)                     = 0x18800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) 
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fcntl64(3, F_DUPFD, 3)                  = 4
fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 2 entries */, 32768)   = 48
getdents64(3, /* 0 entries */, 32768)   = 0
close(3)                                = 0
unlinkat(AT_FDCWD, "/media/Kira/kdyiyv.pif", AT_REMOVEDIR) = -1 ENOENT (No such file or directory)
close(4)                                = 0
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?

答え1

パスが「/media/Kira」なので、リムーバブルUSBドライブにあるとします。 「入出力エラー」を無視して見てはいけませんdmesg

USB デバイスを取り外して再接続する必要があります。この方法だけで役に立たない場合は、コンピュータを再起動してみてください。

関連情報