Recently I got to know of --
that is double-hyphen which is used to tell a command that the option list has ended and what follows should not be considered as a option. So,
grep -- 'search_word' *
would search for the given search_word
. But you could see a unexpected behavior if you remove --
and if there is a single file that start with -
, which would switch on the option that match with the chars in filename.
What is this --
called ? Is there any technical term to this ?
cd --
andcd -
phenomena. whilecd --
means essentially justcd
and thus change into your$HOME
,cd -
means put your self into previous directory. This becomes handy when you wanted tocd ..
but as with german keyboard layout I mix it often up withcd --
.cd -
will then put you back. :D – math Sep 24 '13 at 07:33