<div dir="auto">From the rm manual page: To remove a file  whose name starts with a '-' for example '-foo' use one of these commands<div dir="auto">rm --   -foo</div><div dir="auto">rm  ./-foo </div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">I knew the double dash one not the other</div><div dir="auto"><br></div><div dir="auto">It's nice to know someone realized this could happen and provided a solution.</div><div dir="auto"><br></div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Nov 2, 2019, 4:57 AM Eric Oyen <<a href="mailto:eric.oyen@icloud.com">eric.oyen@icloud.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Put quotes around it. That’s how I handle any filename with strange characters or something that happens to match a flag for a particular CLI utility or 2.<br>
<br>
-Eric<br>
>From the Central Offices of the Technomage Guild, Debugging and Revisions Dept.<br>
<br>
<br>
> On Nov 1, 2019, at 6:56 PM, Seabass <<a href="mailto:PrivateSeaBass@pm.me" target="_blank" rel="noreferrer">PrivateSeaBass@pm.me</a>> wrote:<br>
> <br>
> I suddenly found the folder “-p” in my home directory, one day...<br>
> <br>
> “ ls -p”<br>
> -p/<br>
> <br>
> “ ls -p/”<br>
> / is not a flag option<br>
> <br>
> ”ls *”<br>
> -p<br>
> <br>
> “ls */*”<br>
> No file nor directory...<br>
> <br>
> “rm -p”<br>
> -p isn’t a flag<br>
> <br>
> So....<br>
> I dunno about you guys, but this sucked figuring out how to handle.<br>
> It can be removed with<br>
> “rm -r ./-p/“<br>
> But everything else makes it into a flag.<br>
> <br>
> Moral of the story:<br>
> If a file like “-a” shows up and it’s existence bothers you,<br>
> DON’T TRY REMOVING IT WITHOUT <br>
> “./“ or some other path behind it!<br>
> <br>
> <br>
> ---------------------------------------------------<br>
> PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank" rel="noreferrer">PLUG-discuss@lists.phxlinux.org</a><br>
> To subscribe, unsubscribe, or to change your mail settings:<br>
> <a href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer noreferrer" target="_blank">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank" rel="noreferrer">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer noreferrer" target="_blank">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></blockquote></div>