Is it screw with your admin day?

Bob Elzer bob.elzer at gmail.com
Sat Nov 2 07:40:56 MST 2019


>From the rm manual page: To remove a file  whose name starts with a '-' for
example '-foo' use one of these commands
rm --   -foo
rm  ./-foo


I knew the double dash one not the other

It's nice to know someone realized this could happen and provided a
solution.



On Sat, Nov 2, 2019, 4:57 AM Eric Oyen <eric.oyen at icloud.com> wrote:

> 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.
>
> -Eric
> From the Central Offices of the Technomage Guild, Debugging and Revisions
> Dept.
>
>
> > On Nov 1, 2019, at 6:56 PM, Seabass <PrivateSeaBass at pm.me> wrote:
> >
> > I suddenly found the folder “-p” in my home directory, one day...
> >
> > “ ls -p”
> > -p/
> >
> > “ ls -p/”
> > / is not a flag option
> >
> > ”ls *”
> > -p
> >
> > “ls */*”
> > No file nor directory...
> >
> > “rm -p”
> > -p isn’t a flag
> >
> > So....
> > I dunno about you guys, but this sucked figuring out how to handle.
> > It can be removed with
> > “rm -r ./-p/“
> > But everything else makes it into a flag.
> >
> > Moral of the story:
> > If a file like “-a” shows up and it’s existence bothers you,
> > DON’T TRY REMOVING IT WITHOUT
> > “./“ or some other path behind it!
> >
> >
> > ---------------------------------------------------
> > PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> > To subscribe, unsubscribe, or to change your mail settings:
> > https://lists.phxlinux.org/mailman/listinfo/plug-discuss
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20191102/21c14cae/attachment.html>


More information about the PLUG-discuss mailing list