1

we have an Linux Debian Server in our House as Developer Machine. One of our developers has created accidental an Folder Called Ð?оваÑ? папка

How can I Remove this folder.

I have tried Several things such as Wildcard, Delete via inode Number, Remove via find, but nothing works.

All i get is

No such file or Directory

Here is my Complete Screen from my Removal Tests

root@debian:/etc# cd /var/mmstylo
root@debian:/var/mmstylo# ls -la
total 13
drwxrwxrwx 6 www-data www-data  296 Apr 11 18:04 .
drwxr-xr-x 2 www-data www-data   64 Apr 10 13:24 Ð?оваÑ? папка
-rw-r--r-- 1 www-data www-data 4096 Apr 10 13:24 ._.DS_Store
-rw-r--r-- 1 root     root     6148 Apr 11 18:04 .DS_Store
drwx------ 2 root     root       64 Mar 11 10:31 lost+found
drwxr-xr-x 8 www-data www-data  344 Apr 11 17:21 testwebdav
drwxr-xr-x 8 www-data www-data  280 Apr 10 13:27 webdav
root@debian:/var/mmstylo# rm Ð?оваÑ? папка
rm: cannot remove 'Ð?оваÑ?': No such file or directory
rm: cannot remove 'папка': No such file or directory
root@debian:/var/mmstylo# rm "Ð?оваÑ? папка"
rm: cannot remove 'Ð?оваÑ? папка': No such file or directory
root@debian:/var/mmstylo# mc

root@debian:/var/mmstylo# rm -rf "/var/mmstylo/Ð.оваÑ. папка"

root@debian:/var/mmstylo# ls -li
total 2
93906511492624 drwxrwxrwx 2 root     root      64 Apr 10 13:24 Ð?оваÑ? папка
93906511480544 drwx------ 2 root     root      64 Mar 11 10:31 lost+found
93906511486864 drwxr-xr-x 8 www-data www-data 344 Apr 11 17:21 testwebdav
93906511487328 drwxr-xr-x 8 www-data www-data 280 Apr 10 13:27 webdav
root@debian:/var/mmstylo# find . -inum 93906511492624 -delete
find: cannot delete ‘./Ð\302\235оваÑ\302\217 папка’: No such file or directory
root@debian:/var/mmstylo# find . -inum 93906511492624 -exec rm -i {} \;
rm: cannot remove './Ð'$'\302\235''оваÑ'$'\302\217'' папка': Is a directory
root@debian:/var/mmstylo# rm *?оÐ*
rm: cannot remove 'Ð'$'\302\235''оваÑ'$'\302\217'' папка': Is a directory
root@debian:/var/mmstylo# find . -inum 93906511492624 -exec rm -ir {} \;
rm: remove directory './Ð'$'\302\235''оваÑ'$'\302\217'' папка'? yes
rm: cannot remove './Ð'$'\302\235''оваÑ'$'\302\217'' папка': No such file or directory
root@debian:/var/mmstylo# mc

root@debian:/var/mmstylo# rm *Ñ. Ð*
rm: cannot remove '*Ñ.': No such file or directory
rm: cannot remove 'Ð'$'\302\235''оваÑ'$'\302\217'' папка': Is a directory

root@debian:/var/mmstylo# rm "*Ñ. Ð*"
rm: cannot remove '*Ñ. Ð*': No such file or directory
root@debian:/var/mmstylo# rm './Ð'$'\302\235''оваÑ'$'\302\217'' папка'
rm: cannot remove './Ð'$'\302\235''оваÑ'$'\302\217'' папка': Is a directory
root@debian:/var/mmstylo# mv /var/mmstylo/'./Ð'$'\302\235''оваÑ'$'\302\217'' папка' /var/mmsytlo/testfolder                                                                                                                    mv: cannot move '/var/mmstylo/./Ð'$'\302\235''оваÑ'$'\302\217'' папка' to '/var/mmsytlo/testfolder': No suc                                                                                                                    h file or directory
root@debian:/var/mmstylo# mv './Ð'$'\302\235''оваÑ'$'\302\217'' папка' /var/mmstylo/testfolder
mv: cannot move './Ð'$'\302\235''оваÑ'$'\302\217'' папка' to '/var/mmstylo/testfolder': Input/output error
root@debian:/var/mmstylo# mc

root@debian:/var/mmstylo# ls *Ñ? Ð*
ls: cannot access '*Ñ?': No such file or directory
Ð?оваÑ? папка:
root@debian:/var/mmstylo# rm -r 'Ð?оваÑ?'' папка'
rm: cannot remove 'Ð?оваÑ? папка': No such file or directory
root@debian:/var/mmstylo# rm -r 'Ð?оваÑ?''папка'
rm: cannot remove 'Ð?оваÑ?папка': No such file or directory
root@debian:/var/mmstylo# rm -r 'Ð?оваÑ?' 'папка'
rm: cannot remove 'Ð?оваÑ?': No such file or directory
rm: cannot remove 'папка': No such file or directory
root@debian:/var/mmstylo# rm -r 'Ð?оваÑ?'*'папка'
rm: cannot remove 'Ð?оваÑ?*папка': No such file or directory
root@debian:/var/mmstylo# rm -r 'Ð?оваÑ?*папка'
rm: cannot remove 'Ð?оваÑ?*папка': No such file or directory
root@debian:/var/mmstylo# ls -la
total 13
drwxrwxrwx 6 www-data www-data  296 Apr 11 18:04 .
drwxrwxrwx 2 root     root       64 Apr 10 13:24 Ð?оваÑ? папка
-rw-r--r-- 1 www-data www-data 4096 Apr 10 13:24 ._.DS_Store
-rw-r--r-- 1 root     root     6148 Apr 11 18:04 .DS_Store
drwx------ 2 root     root       64 Mar 11 10:31 lost+found
drwxr-xr-x 8 www-data www-data  344 Apr 11 17:21 testwebdav
drwxr-xr-x 8 www-data www-data  280 Apr 10 13:27 webdav
root@debian:/var/mmstylo# find . -xdev -inum 93906511492624 -exec rm -i '{}' ';'
rm: cannot remove './Ð'$'\302\235''оваÑ'$'\302\217'' папка': Is a directory
root@debian:/var/mmstylo#

We have to delete this Folder because some of our External Customers gets Virus Errors and Warnings every time about this Folder.

But its empty, and guaranteed no Virus.

2
  • 1
    You got several times is a directory .. meaning the directory was found. It was just not removed because you forgot the -r parameter. Try rm -r Ð* again. – Gerald Schneider Apr 12 '19 at 8:25
  • root@debian:/var/mmstylo# rm -r Ð* rm: cannot remove 'Ð'$'\302\235''оваÑ'$'\302\217'' папка': No such file or directory – Nicolay Braetter Apr 12 '19 at 10:33
1

You already have a couple of instances where the directory name is properly escaped and passed correctly to the rm command but those result in an error message, for instance:

rm: cannot remove './Ð'$'\302\235''оваÑ'$'\302\217'' папка': Is a directory

The rm command without any arguments won't remove directories. Try rmdir or use the -r argument for rm

4
  • Thanks a Lot, but didn`t work. There is no such file or directory. – Nicolay Braetter Apr 12 '19 at 10:31
  • root@debian:/var/mmstylo# rmdir './Ð'$'\302\235''оваÑ'$'\302\217'' папка' rmdir: failed to remove './Ð'$'\302\235''оваÑ'$'\302\217'' папка': No such file or directory – Nicolay Braetter Apr 12 '19 at 10:34
  • And did find . -inum 93906511492624 -exec rm -ri {} \; work better? – HBruijn Apr 12 '19 at 10:59
  • root@debian:/var/mmstylo# find . -inum 93906511492624 -exec rm -ri {} \; rm: remove directory './Ð'$'\302\235''оваÑ'$'\302\217'' папка'? yes rm: cannot remove './Ð'$'\302\235''оваÑ'$'\302\217'' папка': No such file or directory – Nicolay Braetter Apr 12 '19 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.