Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that if you have some alias with the name cp, you can bypass it using \cp.

Is this unix syntax? Are there any other uses of this syntax?

share|improve this question
1  
These sorts of things depend on which shell you're using, so it'd be really useful to know that. (There isn't really any such thing as "UNIX syntax") – David Z Aug 24 '10 at 5:02
    
I am using tcsh. – Lazer Aug 24 '10 at 11:54
    
@David: The shell syntax that the OP posted works in most shells. – Dennis Williamson Aug 24 '10 at 15:17
    
@Dennis: Fair enough, I didn't know that. – David Z Aug 25 '10 at 0:49
up vote 4 down vote accepted

It's a feature of the shell and seems to be common to both the Bourne shell family (sh, ksh, bash, zsh) and the C shell family (csh, tcsh). It's based on character escaping. By escaping the first character (actually you can escape any character) it prevents alias expansion from being performed.

$ alias cp='echo hello'
$ cp -v from to
hello -v from to
$ c\p from to
`from' -> `to'

Escaping is used a lot. For just a very brief introduction to a small part of the usefulness of escaping, see the Quoting section in man bash.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .