It's not uncommon for users to accidentally create a file that starts with dashes. However, when you try to remove such files using the rm command in #UNIX / #Linux, the system may consider them as command-line options, leading to an error message. To delete a file with a name starting with a dash character, follow these steps https://www.cyberciti.biz/faq/unix-linux-remove-strange-names-files/
Conversation
Notices
-
nixCraft 🐧 (nixcraft@mastodon.social)'s status on Wednesday, 11-Oct-2023 22:11:53 JST nixCraft 🐧 -
Bence Erős (erosb@mastodon.social)'s status on Thursday, 12-Oct-2023 00:41:04 JST Bence Erős @nixCraft meh.. `node -e "require('fs').unlinkSync('-filename')"`
-