If you have a folder or file which starts with a dash (e.g. “-someFolder”) then simply running
rm for a file) will produce the following error:
> rmdir -someFolder rmdir: illegal option -- s usage: rmdir [-p] directory ...
A neat way to delete such a folder is by referencing the directory first:
> rmdir ./-someFolder
The folder should now be deleted. Files are the exact same, just replace