# remove folder ---thing---



## tennea9 (Oct 23, 2021)

Hello everyone,

Still learning FreeBSD, I was wondering how to remove a folder named : ---thing---
I used `rm -r` but I don't understand how not to make understand  --- as options but as part of the folder name
Can someone help me ?


----------



## rigoletto@ (Oct 23, 2021)

Se rm(1) NOTES for details: `rm -rf -- ---thing---`


----------



## SirDice (Oct 23, 2021)

Lots of commands use getopt(3), so the `--` will make it stop processing options, thus won't try to 'translate' a file/directory with a name like ---thing--- as an option.


----------



## covacat (Oct 23, 2021)

or rm./--


----------



## a6h (Oct 23, 2021)

Find the inode of the directory and/or file:
`ls -i`


```
INODE_NUMBER ---thing---
```

`find . -inum INODE_NUMBER -delete`

Note:
If you're going to delete a directory with that method, the directory should be empty.


----------



## tennea9 (Oct 23, 2021)

Wahouuh.. Fantastic !! thank you very much !


----------



## grahamperrin@ (Oct 23, 2021)

covacat said:


> or rm./--



Expanded a little:


```
% pwd
/tmp
% find . -name "*thing*" -print
./---thing---
% rm -r ./---thing---/
% find . -name "*thing*" -print
%
```



rigoletto@ said:


> … rm(1) NOTES …



☑


----------

