Difference between revisions of "Removing files with weird names"
From Noah.org
Jump to navigationJump to search (New page: Category:Engineering In a shell type: <pre> touch -- -rf </pre> Now as yourself, "how do I delete it?" Most GNU tools will accept '--' as an option. This tells the option parser to...) |
|||
Line 1: | Line 1: | ||
[[Category:Engineering]] | [[Category:Engineering]] | ||
− | + | [[Category:Disks_and_Filesystems]] | |
− | In a shell | + | In a shell run this command: |
<pre> | <pre> | ||
Line 7: | Line 7: | ||
</pre> | </pre> | ||
− | Now | + | First thing, don't try to remove this file! Now ask yourself, "How do I delete it?". |
− | Most GNU tools will accept '--' as an option. This tells the option parser | + | Most GNU tools will accept '--' as an option. This tells the option parser to stop interpreting the arguments list as options. For example, to remove a file named "-rf" do this: |
− | to stop interpreting the arguments list as options. For example, to remove | ||
− | a file named "-rf" do this: | ||
<pre> | <pre> | ||
rm -- -rf | rm -- -rf | ||
</pre> | </pre> |
Revision as of 13:42, 25 August 2008
In a shell run this command:
touch -- -rf
First thing, don't try to remove this file! Now ask yourself, "How do I delete it?".
Most GNU tools will accept '--' as an option. This tells the option parser to stop interpreting the arguments list as options. For example, to remove a file named "-rf" do this:
rm -- -rf