1
There is an object on btrfs file system called "????????? ??????" which probably some improperly deleted or copied temporary file or directory. And which can't be removed with common commands: rm, rm -d:
[root@localhost sessions]# rm -d \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
rm: cannot remove ‘????????? ??????/’: Directory not empty
[root@localhost sessions]# rm -dr \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
rm: descend into directory ‘????????? ??????/’? y
rm: remove directory ‘????????? ??????/’? y
rm: cannot remove ‘????????? ??????/’: No such file or directory
[root@localhost sessions]# rm \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
rm: cannot remove ‘????????? ??????/’: Is a directory
[root@localhost sessions]# file \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
????????? ??????/: directory
How such objects should be deleted?
UPDATE: OS and shell:
Linux 4.0.4-2-ARCH #1 SMP PREEMPT Fri May 22 03:19:32 UTC 2015 i686 GNU/Linux
GNU bash, version 4.3.39(1)-release (i686-pc-linux-gnu)
UPDATE2:
[root@localhost sessions]# rm -fr \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
[root@localhost sessions]# ls
????????? ?????? backup-9.session
[root@localhost sessions]# lsattr \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
[root@localhost sessions]#
UPDATE3:
[root@localhost sessions]# echo $LANG
en_US.UTF-8
[root@localhost sessions]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
UPDATE4:
[root@localhost sessions]# ls -la
ls: ????????? ??????: No such file or directory
total 23760
drwxr-xr-x 1 al users 0 Aug 13 2014 ????????? ??????
drwxr-xr-x 1 al users 0 Jun 7 05:53 .
drwx------ 1 al users 0 Jun 8 05:06 ..
-rw-r--r-- 1 al users 274557 May 24 18:58 backup-11.session
UPDATE5:
[root@localhost sessions]# find . -exec rm -fr {} \;
rm: refusing to remove ‘.’ or ‘..’ directory: skipping ‘.’
[root@localhost sessions]# ls -la
ls: ????????? ??????: No such file or directory
total 0
drwxr-xr-x 1 al users 0 Aug 13 2014 ????????? ??????
drwxr-xr-x 1 al users 0 Jun 8 17:03 .
drwx------ 1 al users 0 Jun 8 05:06 ..
[root@localhost sessions]#
The command I usually use is
rm -rf
. Are you sure that the directory name is correct (ls
often shows?
for unprintable characters)? Tryls -b
to verify. I often find a GUI file manager is a good way to remove awkward names. A little more about your Linux distribution and shell flavour would be helpful. – AFH – 2015-06-08T13:19:02.427@AFH: the name was entered with autocompletion by pressing Tab. About OS and shell I updated the post. – Al Berger – 2015-06-08T13:26:04.740
1Looking at the comments against e_z's answer, I am inclined to suspect a file system corruption. If the problem is in the same partition as the root directory, you'll need to boot another system, such as a Live CD, and run
fsck
from there (or use recovery mode). You should also be able to delete from there, and a Live CD will give you a GUI file manager in case you've not configured one in your system. – AFH – 2015-06-08T14:41:58.993AFH, I just started another 'btrfs check' and it shows 'checksum verify failed on...'. When it ends I'll run 'btrfs check --fix-crc' and see if the problem persists. – Al Berger – 2015-06-08T14:46:19.660