How to delete folder of this type ".carpeta"
and that is not empty.
I have used rmdir --ignore-fail-on-non-empty
but apparently it doesn't work. The folder is in /home/usuario
.
How to delete folder of this type ".carpeta"
and that is not empty.
I have used rmdir --ignore-fail-on-non-empty
but apparently it doesn't work. The folder is in /home/usuario
.
Those folders you refer to are considered by Linux to be hidden. The same happens with files of the type
.archivo.txt
.The command
rmdir
only works to remove empty folders. In fact, this is shown in the command help:It says "if they are empty" (if they are empty).
The flag
--ignore-fail-on-non-empty
does not ignore the fact that the folder is empty, it just ignores the error message:The error message has been ignored but the folder and its contents still exist.
As Daniel mentions in his comment, you can achieve this using the
rm
. It is not necessary to usesudo
if the folder belongs to your user. Now, the flag-r
is used to delete recursively, that is, if.carpeta
there are more directories and files inside, then these will also be deleted. The flag-f
is used to force the deletion without asking for confirmation, even if it is write-protected:Goodbye, folder.