###前提・実現したいこと
docker コンテナ内部でファイルを完全に削除したい。
###発生している問題・エラーメッセージ
rm testfile
とすると 問題なくコマンドが正常終了するが
その後以下実行するとtestfileが残っているような表示になる。
ls -l
?????????? ? ? ? ? ? testfile
ファイル名を指定して実行すると以下になる。
ls -l testfile
ls: cannot access testfile: No such file or directory
###試したこと
削除後に
touch testfile
を実行すると正常にコマンドが実行できる。
その後
mv testfile testfile2
とした後にls を実行すると、
問題で記載している内容の
?????????? ? ? ? ? ? testfile
が表示される。
sh-4.2# LANG=C /bin/ls -l > /tmp/lslog.txt
/bin/ls: cannot access testfile: No such file or directory
sh-4.2# less /tmp/lslog.txt
以下、抜粋
-rw-r--r-- 1 root root 0 Apr 19 11:14 lslog.txt
?????????? ? ? ? ? ? testfile
lsattr testfile を実行すると。
lsattr: No such file or directory while trying to stat testfile
と表示される。
??????の文字化けを解消するため
docker stop コンテナ名
docker rm コンテナ名
docker run -e LANG=en_US.UTF-8 -it コンテナ名 /bin/bash
を実行して再度ls をするが、文字化け?は変わらず。
###補足情報(言語/FW/ツール等のバージョンなど)
OS; CentoS 7.3.1611
Docker: version 17.04.0-ce, build 4845c56
Dockerコンテナ内部のファイルシステム: overlay
