Answer the question
In order to leave comments, you need to log in
Why the -s option in linux?
To run nginx, you need to execute the executable. Once nginx is running, it can be controlled by calling the executable with the -s option. Use the following syntax:
nginx -s signal
is also used in kill
kill -s QUIT 1628
and ln -s file1 lnk1* - create a symbolic link to a file or directory
ln file1 lnk1 - create a "hard" (physical) link to a file or directory
but in the latter case, the difference is clear, such a syntax, but in the first two it is not clear - after all, they work without -s, so why this parameter?
Answer the question
In order to leave comments, you need to log in
These are completely different things.
The key (option) in the command can mean anything - depending on the specific command.
- in your 1st case - this is sending a UNIX signal;
- in the 2nd - an indication of what type of link;
No command keys have any predetermined meaning!
Any UNIX command can have completely arbitrary switches. Their meaning is entirely set by the developer. The developer can give them any name, short names for parts of the keys, long names for parts, use the GNU standard (--keyname=keyvalue) or getopt (-keyname=keyvalue), or even the DOS standard (/keyname:keyvalue) - and there's nothing to be done :) Inside some large projects (for example, GNU) there is some internal agreement on the formation of parameters, keys, etc., but there is no general agreement among all developers and cannot be :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question