Saya memiliki direktori di dalamnya. Bagaimana cara saya menghapusnya.
~/.local/share/Trash/files$ ls devices/
reg-dummy
~/.local/share/Trash/files$ ls devices/reg-dummy/
subsystem
~/.local/share/Trash/files$ ls devices/reg-dummy/subsystem/
devices
Juga
~/.local/share/Trash/files$ find devices/ | head -n 20
devices/
devices/reg-dummy
devices/reg-dummy/subsystem
devices/reg-dummy/subsystem/devices
devices/reg-dummy/subsystem/devices/reg-dummy
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices
devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy/subsystem/devices/reg-dummy
Juga, meskipun otak saya tidak dapat menyelesaikan masalah penghentian, tampaknya itu sudo rm -rf devices
berlangsung selamanya tanpa menghasilkan keluaran.
~/.local/share/Trash/files$ sudo rm -rf devices
^C~/.local/share/Trash/files$
Hal yang sama untuk perl -e 'use File::Path qw(remove_tree); remove_tree("$ENV{HOME}/.local/share/Trash/files/devices")'
. Hal yang sama untuk du -s devices/
. Hal yang sama untuk du -sch ~/.local/share/Trash/
perintah lainnya
$ cd ~/.local/share/Trash/files/devices/reg-dummy/subsystem/devices/
$ ls -ldi
8131921 drwxr-xr-x 3 theking theking 4096 Mar 17 19:43 .
$ cd reg-dummy/subsystem/devices/
$ ls -dli
8131926 drwxr-xr-x 3 theking theking 4096 Mar 17 19:43 .
$ find .local/share/Trash/files/ -maxdepth 1 -delete
find: cannot delete `.local/share/Trash/files/devices': Directory not empty
find: cannot delete `.local/share/Trash/files/': Directory not empty
Saya tidak ingin itu terjebak di tempat sampah saya selamanya!
Catatan: Saya membuat cadangan kasar komputer dengan hanya menggunakan scp
, dan tetapi saya kehabisan ruang dan kemudian ini terjadi.
ls -dli devices
danls -dli devices/reg-dummy/subsystem/devices/
ls -ldi devices
, bukan device
. Saya mencoba melihat apakah ini benar-benar tautan keras (inode yang sama). Namun, perlu diketahui bahwa jika ini adalah direktori besar, rm -rf
akan memakan waktu lama tetapi pada akhirnya akan berfungsi. Jika masalah di sini adalah tautan melingkar, Anda akan mendapatkan pesan kesalahan tentang rekursi tak terbatas. Jika tidak ada pesan kesalahan, biarkan rm -rf
jalankan saja.
rm -rf devices
harus dilakukan