linux command: dash as a operand

for exampe: mv -- -a.txt

The -- delimit the option list. Later arguments, if any, are treated a operands even if they begin with - or --. This applies to all commands such as rm, cp, mv, ls, ln and so on:

 command

 -- 'file'


command

 [

options]

 -- 'file'


rm

 -- '--filename'


rm

 -fr -- '-dirname'


rmdir

 -- '--dirname'

猜你喜欢

转载自thatsmyiteye.iteye.com/blog/1162971
今日推荐