Use of hyphen in shell command
- by deanloh
I feel shy to ask this question, but if I don't I will never know, so here I am giving it a shot:
I notice most shell commands use "-" for options, but I also noticed some commands do not have it. For example, to archive files in a given direct, the command is:
tar czvf allmyfiles.tar.gz *
However, to extract an archive, the command I learned, is:
tar -zxvf allmyfiles.tar.gz
Looking at both examples above, is there any significance whether to include the hyphen or not?