Is sudo inherited to aliased commands?

michaelsanford

Translator, Web Developer
from .tcshrc
alias shred 'rm -rP $1'

If I enter sudo shred temp will that execute sudo rm -rP temp or so I have to use sudo in the alias definition?
 
That should work fine, assuming the .tcshrc file you're talking about is the active one. Aliases are processed by the shell before it carries out the command, and can be placed anywhere within the command you enter.

So, yes, that should work.
 
Back
Top