用各式方法也無法移除的檔案 - Linux

Table of Contents


各位大神們好

小弟在工作上處理BSP時遇到一個問題

我想刪除一整個build好的root file system資料夾

但有個叫做ptmx的檔案無論用什麼方法都刪不掉

此檔案在/dev/pts底下

權限已經用sudo chmod 777更改如下:

https://imgur.com/b1ieLJ9

用sudo rm -rf會出現:

https://imgur.com/yLnNwYw

這時候想用lsattr去看他是否有其他特別屬性也沒辦法:

https://imgur.com/a/ZyjRWW2

用file查看他也不是link檔 是一個character special file:

https://imgur.com/a/4KWe7vV


想請問大家還有什麼方法可以移除這個檔案嗎?

整個資料夾都刪光光了就差他而已...

--

All Comments

Poppy avatarPoppy2021-09-04
remove file by inode number ?
Rosalind avatarRosalind2021-09-08
driver產生的虛擬檔案?
Sierra Rose avatarSierra Rose2021-09-11
你umount它就好幹嘛刪它
Carolina Franco avatarCarolina Franco2021-09-14
https://reurl.cc/MAnqkp
大哥,這是你開terminal會產生的檔案,你用termin
al自己砍自己怎麼砍的掉,就算讓你砍掉了,再開一
個terminal又會自己生出來了。
Tom avatarTom2021-09-18
大哥 google "linux ptmx"不就有資訊了嗎
Ingrid avatarIngrid2021-09-21
man ptmx。網路上的文件要找 2006 以後的。
Olivia avatarOlivia2021-09-24
別想刪除這個,那是 devpts 掛載,裡面後續系統自行管理
Carol avatarCarol2021-09-27
想做BSP工作不能不知道device file 阿!