What is the command env ls -al
doing?
I had a Linux test and there was question: "How to run command directly, but not its alias?"
I knew that there exists solution like prefixing command with some special symbol, but I forgot it. Now I know that it is \
. (read from this post).
But I also remember that somewhere I read that to get rid of alias we can prefix a command with env
. I did it and it seems works, but my answer was qualified as wrong.
I read info
and man
on env
, but didn't understood too much.
What is env
doing and exactly in env <command>
without any arguments for env
itself?
env <command>
,command <command>
, and\<command>
. In my opinion, if some test saidenv <command>
is invalid, then that test is broken. – phemmer Dec 03 '13 at 13:59command
orenv
which would make\\
the only acceptable answer. – Pierre Arlaud Dec 03 '13 at 14:41\\
isn't defined in posix (as an alias escape), so it's not portable. So it's no more acceptable than the others. – phemmer Dec 03 '13 at 14:46man
and didn't understood whatenv
exactly doing. After this post - it's clear and my answer was reviewed (accepted). Thanks to all! – ALZ Dec 03 '13 at 16:33l\s
,"l"s
,ls''
,ls$()
, … – Gilles 'SO- stop being evil' Dec 03 '13 at 22:41