shuini
shuini

Reputation: 29

Linux - Unable to remove directory that exist

Tried to clean up vim bundle files today and ran into this directory hidden under one of the bundle that I simply cannot remove.

Ran rm -rf in directory ~/.vim/, output as follow:

 ~/.vim/bundle $ rm -rf YouCompleteMe/third_party/ycmd/ycmd/tests/testdata/

rm: cannot remove ‘YouCompleteMe/third_party/ycmd/ycmd/tests/testdata/’:Directory not empty

so I went into the directory to have a look:

 ~/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/tests/testdata $ l
 total 12
 drwxrwxrwx 3 syan51 general 4096 Oct 11 17:44 .
 drwxrwxr-x 3 syan51 general 4096 Oct 11 17:44 ..
 drwx------ 2 syan51 general 4096 Oct 11 17:44 неприличное слово

then i try to remove this directory explicitly:

~/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/tests/testdata $ rm -r ./неприличное\ слово/
rm: remove directory ‘./неприличное слово/’? y
rm: cannot remove ‘./неприличное слово/’: No such file or directory

I tried chmod, rm -ri -- *, removing testdata instead, none worked. I tried mv and cp, both complaint that there is no such file or directory.

(Sidenote: anyone can kindly explain what the directory name means??)

Upvotes: 2

Views: 1022

Answers (2)

T.Tony
T.Tony

Reputation: 515

Switch to root then try

rm -rf YouCompleteMe/third_party/ycmd/ycmd/tests/testdata/

Upvotes: 1

Alexander Zakharenko
Alexander Zakharenko

Reputation: 71

Try to use strace rm -r ./неприличное\ слово/ to see what system call fails and what the error is, maybe it will help.

"неприличное слово" means "bad/rude word".

Upvotes: 0

Related Questions