Re: rm a file with name '--min-size=8'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yuandan Zhang wrote:
> Hi,
> I incidantly created file named as '--min-size=8'. In fact, I don't know how
> it was created. I have difficulty to remove it using "rm -rf \--min-size=8
> or other ways?

GNU rm, like most other GNU tools, will treat a single set of double hyphens
("--") as the end of the option listing, so everything after it will be taken
literally, so something like the following should work:

$ rm -i -- --min-size=8

(Note the "-i" option: Be sure that the file it is asking to delete is the file
that you want to remove. rm can be a both a very useful tool and an extremely
dangerous weapon against one's system. Think of it as analogous, in some ways,
to a knife: Extremely useful when used properly, but it can be quite deadly if
great care is not taken in its use.)

Alternatively, you can escape every hyphen and equals sign within the file name:
$ rm -i \-\-min\-size\=8

I'm a big fan of using the double-hyphen method though, as it's clearer to me.

Hope that helps.
-- 
Peter Gordon (codergeek42)
This message was sent through a webmail
    interface, and thus not signed.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux