Skip to content
Advertisement

How to delete an empty folder with 2 times . (dot) file and .. (dot dot) file?

On a qnap nas I have a folder that I cannot delete.
The folder is empty except for 4 directories: 2 times a . (dot) folder and 2 times a .. (dot dot) folder. To my knowledge this is not possible.
Does anyone know of a way to remove this folder?
Thank you.

[/share/CACHEDEV1_DATA/backup/comfoplus/2022-04-04-21.16.33] # ls -lai
total 72
100761657 drwxrws---   3 admin    96  4096 2022-10-14 14:14 ./
100769284 drwxrws--- 126    96    96 36864 2022-10-07 07:46 ../
 16351557 drwxrwxrwx  14 guest guest 16384 2022-10-04 21:15 x/

[/share/CACHEDEV1_DATA/backup/comfoplus/2022-04-04-21.16.33] # ls -lai x
total 56
 16351557 drwxrwxrwx 14 guest guest 16384 2022-10-04 21:15 ./
 16351557 drwxrwxrwx 14 guest guest 16384 2022-10-04 21:15 ./
100761657 drwxrws---  3 admin    96  4096 2022-10-14 14:14 ../
100761657 drwxrws---  3 admin    96  4096 2022-10-14 14:14 ../

[/share/CACHEDEV1_DATA/backup/comfoplus/2022-04-04-21.16.33] # rm -rf x
rm: can't remove 'x': Directory not empty

About the nas:

[/share/CACHEDEV1_DATA/backup/comfoplus/2022-04-04-21.16.33] # uname -a
Linux S203NASR1L 5.10.60-qnap #1 SMP Tue May 31 05:39:59 CST 2022 x86_64 GNU/Linux

Advertisement

Answer

fsck (file system consistency check) solved the problem.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement