一種不能刪除檔案的情況分析過程

來源:互聯網
上載者:User

標籤:

一種不能刪除檔案的情況分析過程

我是root,今有一個檔案夾,A 不能刪除

 
  1. rm -rf A
    rm: cannot remove `A‘: Read-only file system

1 查看檔案夾以及內部檔案進階屬性,看此檔案或者此檔案夾內部檔案是否有設定了特殊屬性

  1. find A -exec lsattr {} \;
  2. --------------- ./A/a
  3. --------------- ./A/b
  4. --------------- ./A/c

檔案正常。
 2 查看是否被以唯讀方式掛載。

  1. mount
  2. /dev/mapper/A /A type ext3 (ro,relatime,errors=continue,barrier=1,data=journal)

找到了,原來如此啊。

首先umount

  1. umount /A
  2. umount: A: device is busy.
  3. (In some cases useful info about processes that use
  4. the device is found by lsof(8) or fuser(1))

看看 誰在用

  1. #fuser A
  2. #

沒人在用啊,強制點

  1. fusermount -u -z /A

OK,卸載了,當然所要刪除的正好也不存在了

一種不能刪除檔案的情況分析過程

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.