Re: "\" prefacing commands (was: forcing overwrite with cp in FC5)

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

 



Pete Geenhuizen wrote::

> When in doubt and far simpler is to preface the
> command with \
> i.e \cp file1 file2
> 
Marcelo Magno T. Sales wrote:
> I liked that hint! I didn't know about this use of "\", other than escaping 
> special characters.

That's basically what the "\" is doing. The alias expansion is done at
about the same level as other special character expansions. The "\", by
quoting one of the characters in the alias, "hides" the "cp" from the
alias-expansion code, in much the same way as "\" in front of "*" hides
the asterisk from the globbing code.

So c\p file1 file2 would work just as well.

James.
-- 
E-mail:     james@ |     'Sir, they've taken Mr. Rimmer!'
aprilcottage.co.uk |     'Quick, let's get out of here before they bring him
                   | back!'
                   |     -- Kryten and Cat, 'Red Dwarf'


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux