× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Delete folder starting with double backslash

RaedyNas
Aspirant

Delete folder starting with double backslash

Usuing ssh, how to remove a folder that has 2 backslashes? I can't cd or rm on the folder. From pic I would like to remove \\2020servertower and \\NAS-EA-70-E5

RaedyNas_0-1687978799123.png

RaedyNas_1-1687978934518.png

 

ReadyNas OS6 Pro

Message 1 of 4

Accepted Solutions
StephenB
Guru

Re: Delete folder starting with double backslash


@RaedyNas wrote:

Usuing ssh, how to remove a folder that has 2 backslashes? I can't cd or rm on the folder. From pic I would like to remove \\2020servertower and \\NAS-EA-70-E5

 


How did you manage to create them?

 

Note the file names aren't \\2020servertower and \\NAS-EA-70-E5.  The single backslash isn't part of the path, so the full names include everything after the single backslash.  That includes the spaces.

 

First do an ls -als to let you know if you are dealing with files or folders.  It wouldn't surprise me if these are actually soft links.  They could also somehow be mount points, so maybe run this also, and see if it returns any results:

mount | grep '\\'

 

You could try using wildcards - ??2020servertower* and ??NAS-EA-70-E5*

 

Or you could try putting a single quote around the full file name.

 

Either way, be very careful.  You are working in the system root, and if you use the wrong commands you could easily end up with an unbootable NAS.  I suggest using the -i option in rm (requiring confirmation before every deletion)

View solution in original post

Message 2 of 4

All Replies
StephenB
Guru

Re: Delete folder starting with double backslash


@RaedyNas wrote:

Usuing ssh, how to remove a folder that has 2 backslashes? I can't cd or rm on the folder. From pic I would like to remove \\2020servertower and \\NAS-EA-70-E5

 


How did you manage to create them?

 

Note the file names aren't \\2020servertower and \\NAS-EA-70-E5.  The single backslash isn't part of the path, so the full names include everything after the single backslash.  That includes the spaces.

 

First do an ls -als to let you know if you are dealing with files or folders.  It wouldn't surprise me if these are actually soft links.  They could also somehow be mount points, so maybe run this also, and see if it returns any results:

mount | grep '\\'

 

You could try using wildcards - ??2020servertower* and ??NAS-EA-70-E5*

 

Or you could try putting a single quote around the full file name.

 

Either way, be very careful.  You are working in the system root, and if you use the wrong commands you could easily end up with an unbootable NAS.  I suggest using the -i option in rm (requiring confirmation before every deletion)

Message 2 of 4
RaedyNas
Aspirant

Re: Delete folder starting with double backslash

Thanks!

How did you manage to create them? A program called syncthing default save location was the root.  I let a user create a folder and they didn't change the folder location. It started filling up the file space, luckily it stopped before full. I'm trying to clean it all up now.

 

I think I understood that the whole file/folder name is the full line, my lack of knowledge on the back slashes messing it up somehow.  I had tried to go into the folder with many combinations: encased in (double) quotes, adding slashes, removing slashes, no slashes, etc… Guess I missed the single quote

RaedyNas_0-1688102772612.png

 

Mount | grep ‘\\’ didn’t return anything.

RaedyNas_1-1688102772615.png

 

I was able to navigate to the folder with the wildcards. Checked the size of it with ls -als -h and then removed it.

RaedyNas_4-1688102877117.png

RaedyNas_2-1688102772628.png

 

Would this look like a normal root now?

RaedyNas_3-1688102772673.png

 

Message 3 of 4
StephenB
Guru

Re: Delete folder starting with double backslash

My RN526 root looks like this:

 

16 drwxr-xr-x   1 root  root   260 Jun 30 00:05 .
16 drwxr-xr-x   1 root  root   260 Jun 30 00:05 ..
 0 drwxrwxr-x   1 admin admin  212 May 22 11:07 apps
 0 drwxr-xr-x   1 root  root  1338 May 22 11:05 bin
 0 drwxr-xr-x   1 root  root     0 May 21  2012 boot
32 drwxr-xr-x   1 root  root   510 Feb 22 20:40 data
 0 drwxr-xr-x  16 root  root  3440 May 22 11:07 dev
 0 drwxr-xr-x   1 root  root  2800 Jun 16 09:38 etc
 0 drwxr-xr-x   1 root  root    54 May 22 11:05 frontview
 0 -rw-r--r--   1 root  root     0 Nov  9  2016 ftp_ban.tbl
 0 drwxr-xr-x   1 admin admin   10 Mar 12 09:34 home
 4 lrwxrwxrwx   1 root  root     5 Nov 22  2016 homes -> /home
 0 drwxr-xr-x   1 root  root   462 May 22 11:05 lib
 0 drwxr-xr-x   1 root  root    40 May 22 11:05 lib64
 0 drwxr-xr-x   1 root  root    32 Jun  4  2012 media
 0 drwxr-xr-x   1 root  root     0 Jan 25  2016 mnt
 0 drwxr-xr-x   1 root  root    98 Oct 11  2022 opt
 0 dr-xr-xr-x 243 root  root     0 May 22 11:05 proc
 4 -rw-------   1 root  root  1024 Nov 23  2016 .rnd
 0 drwx------   1 root  root    92 Jun 20 13:20 root
 0 drwxrwxr-x  24 root  admin  860 Jun 30 05:00 run
 0 drwxr-xr-x   1 root  root  2590 May 22 11:05 sbin
 0 drwxr-xr-x   1 root  root     0 Jun  4  2012 srv
 0 dr-xr-xr-x  12 root  root     0 May 22 11:06 sys
 0 drwxrwxrwt   1 root  root   210 Jun 30 06:25 tmp
 0 -rw-r--r--   1 root  root     0 May 22 11:04 .update_success
 0 drwxr-xr-x   1 root  root    70 Oct 11  2022 usr
 0 drwxr-xr-x   1 root  root   146 May 22 11:05 var

Mine has

  1. No selinux folder
  2. a softlink from homes-> /home that yours is missing.
  3. an empty ftp_ban.tbl

FTP is enabled on my NAS, perhaps not on yours.

 

Message 4 of 4
Top Contributors
Discussion stats
  • 3 replies
  • 1000 views
  • 1 kudo
  • 2 in conversation
Announcements