πΎ Archived View for gerikson.com βΊ gemlog βΊ lobsters-drafts βΊ rm-rf.gmi captured on 2021-12-05 at 23:47:19. Gemini links have been rewritten to link to archived content
β¬ οΈ Previous capture (2021-12-03)
β‘οΈ Next capture (2022-03-01)
-=-=-=-=-=-=-
One guy said his preferred method was to cd up and nuke the whole directory.
Wow.
The method I learned, and used when helping my coworker, was the `--` option to `rm`.
Nowadays `rm` seems to detect this and gives a help text:
$ rm -testfile rm: invalid option -- 't' Try 'rm ./-testfile' to remove the file '-testfile'. Try 'rm --help' for more information.
This option is included in this article
which is high up on the search result for "linux remove file starting with dash".
Then there's this "creative" solution:
There are some characters that you cannot remove using any of the above methods, such as forward slashes, interpreted by Unix as directory separators. To remove a file with such meta-characters, you may have to FTP into the account containing the file from a separate account and enter the command:
`mdel`
You will be asked if you really wish to delete each file in the directory. Be sure to answer n (for no) for each file except the file containing the difficult character that you wish to delete.
ββββββββββββββββββββββββββββββββββββββββββββ
β more posts in the βΉlobsters-draftsβΊ category
About this category: βSometimes I post to lobste.rs, sometimes I write angry rants that end up here but not thereβ
Copyright Β© 2018 - 2021 Gustaf Erikson