man
often doesn't contain the example of a command, or very little.
Such as scp
:
NAME
scp — secure copy (remote file copy program)
SYNOPSIS
scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port]
[-S program] [[user@]host1:]file1 ... [[user@]host2:]file2
This is hard to understand where to put source file and destination file, same as documents like this.
It is very clear and easy understand with an example and some description:
scp -r user@source_machine:/user/Desktop user@remote_machine:/path/foo
And as zip:
NAME
zip - package and compress (archive) files
SYNOPSIS
zip [-aABcdDeEfFghjklLmoqrRSTuvVwXyz!@$] [--longoption ...] [-b path] [-n suffixes] [-t date] [-tt
date] [zipfile [file ...]] [-xi list]
Thanks it has exmaple zip -r foo.zip foo
The normal way I think is zip
A into B, [zipfile [file ...]]
maybe saying you can pack zipfile with other files too(on no-native speaker vision). Only the example can make that clear.
So I wonder if there is a command or tool can show me the example of a command.
"command" --help
and see if that solves your problem. – James Aug 24 '16 at 03:05"command" --help
to see uses for the code. Try typing inzip --help
and see what it says. – James Aug 24 '16 at 03:11"command" --help
wouldn't help more thanman command
. I am not talking about every command, just the major widelly used command.(I know a lot of command from small project can only use --help, have to goole ), I just mentionzip
andscp
as common widely used command for example.Andzip --help
is not as useful asman zip
, no example there. – Mithril Aug 24 '16 at 03:17