By chenyi, 27 March, 2025

报错

root@bf19e2a71b7c:/home/scy/raw/Torreya# rm -rf torreya_noptg/
rm: cannot remove 'torreya_noptg/.nfs00000000888910c9001a8a16': Device or resource busy

解决办法

root@bf19e2a71b7c:/home/scy/raw/Torreya# lsof +d torreya_noptg
COMMAND  PID USER   FD   TYPE DEVICE    SIZE/OFF       NODE NAME
bash    1634 root  cwd    DIR   0,41          56 2290684104 torreya_noptg
head    1657 root  cwd    DIR   0,41          56 2290684104 torreya_noptg
head    1657 root    3r   REG   0,41 18886670008 2290684105 torreya_noptg/.nfs00000000888910c9001a8a16
root@bf19e2a71b7c:/home/scy/raw/Torreya# kill -9 1657
root@bf19e2a71b7c:/home/scy/raw/Torreya# lsof +d torreya_noptg
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF       NODE NAME
bash    1634 root  cwd    DIR   0,41        0 2290684104 torreya_noptg
root@bf19e2a71b7c:/home/scy/raw/Torreya# ls
torreya_noptg
root@bf19e2a71b7c:/home/scy/raw/Torreya# rm -rf torreya_noptg/
root@bf19e2a71b7c:/home/scy/raw/Torreya# ls
root@bf19e2a71b7c:/home/scy/raw/Torreya#