how do delete a folder with a strange name

SMB, NFS, FTP, web file manager and Rsync server.
Locked
User avatar
vss
Posts: 6
Joined: 05 Feb 2021, 00:41

how do delete a folder with a strange name

Post by vss »

Hello all,
I have a problem (see a picture below)
Image
How I can remove a "????????" folder?
User avatar
vss
Posts: 6
Joined: 05 Feb 2021, 00:41

Re: how do delete a folder with a strange name

Post by vss »

One more problem to TechSupport:
I have RAID1 volume (/mnt/md1) with some folders ("FamilyDocs", "FamilyMedia", etc).
I have a empty folder "Media" here.
I am a root (ssh login)
I can not delete "Media" folder.
Image
What i need to do for delete "Media" folder?
Thank you in advance!
User avatar
vss
Posts: 6
Joined: 05 Feb 2021, 00:41

Re: how do delete a folder with a strange name

Post by vss »

additional info about my device:
F4-210 (2Gb), TOS 4.2.08-2101111540
4 HDD:
-2 hdd for Raid0 (/mnt/md0)
-2 hdd for Raid1 (/mnt/md1)
I can get more info. I can not get a remote access to my device. Sorry.
I'm waiting for answers from TMSupport here.
TMS

Re: how do delete a folder with a strange name

Post by TMS »

Hi,
First, this question mark is actually a non-English name that cannot be displayed. If you want to operate, you can copy this string of question mark characters, right-click and paste into the command (or modify the file name)
Second, please see if any program is occupying this "Media" file
You can try go to the desktop to operate the files you mentioned.
User avatar
vss
Posts: 6
Joined: 05 Feb 2021, 00:41

Re: how do delete a folder with a strange name

Post by vss »

Dear TMS,
Thank you for answer.
You are right - this question mark is actually a non-English name that cannot be displayed.
It was a string of cyrillic letters (I create a folder with russian letters from desktop application).
Of course, I can copy this string of question mark characters, by right-click and paste into the command.
You can see on my pictures, I have used this method early.
Problems are:
1)
- I am a 'root' user
- I can not see a 'Media' folder by desktop application
- I can see a 'Media' folder (without a non-English letters) by ssh terminal on /mnt/md1
- I cannot delete 'Media' folder on /mnt/md1 by CLI command
root@stora2:/mnt/md1# ls -al
total 20
drwxr-xr-x 1 root root 82 Feb 5 00:25 .
drwxr-xr-x 6 root root 4096 Feb 5 23:05 ..
drwxrwxrwx+ 1 root root 2080 Jan 31 16:39 FamilyDocuments
drwxrwxrwx+ 1 root root 880 Jan 31 21:43 FamilyMedia
drwxrwxrwx 1 root root 0 Jan 31 12:54 Media
drwxrwxrwx 1 root root 0 Jan 31 12:52 ??????????
root@stora2:/mnt/md1# rm -rf Media
rm: can't remove 'Media': Operation not permitted
root@stora2:/mnt/md1#
- there are no one process use 'Media' folder on /mnt/md1
root@stora2:/mnt/md1# ps -aux | grep Media
root 30559 0.0 0.0 3168 384 pts/0 S+ 23:30 0:00 grep Media
root@stora2:/mnt/md1#
2)
I have the same problem with "????????" folder

Could you help me to delete a 'Media' folder?
TMS

Re: how do delete a folder with a strange name

Post by TMS »

Hi,here are the commands:
cd /mnt/md1
rm -rf `ls|egrep -v'(FamilyDocuments|FamilyMedia)'`
Note: This command deletes all files except these two folders ,the excluded folders are in parentheses. Make sure to enter the md1 directory and run the second command , then check whether the folder name is the same as in the brackets. It is best to back up the data before operation and operate with caution.
By the way,how was this "Media" created?
Locked

Return to “File Services”