
我試圖通過寫入來創建一個文件,但我得到了它不存在的錯誤(當然它不存在——我正在嘗試創建它!)
我知道問題所在小路文件不存在(例如,如果我輸入touch /path/to/folder/file_x
,並且目錄 /path/to/folder/
不存在,那麼這就有意義了。不是這裡發生了什麼事。我位於要建立檔案的本機目錄中(沒有路徑問題)。
touch file_a
touch file_b # <-- these files are created, no problem
但對於我之前創建並已刪除的特定文件名,這會破壞:
touch file_x
touch: cannot touch 'file_x': No such file or directory
我也無法刪除它:
rm file_x
rm: cannot remove 'file_x': No such file or directory
我無法刪除不存在的東西,但也無法再次創建它。我不明白怎麼可能。這是在 NTFS 驅動器上,所以也許 Linux 掛載 Windows 驅動器有問題?