C
C
crayes232016-09-23 11:33:36
linux
crayes23, 2016-09-23 11:33:36

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

3 answer(s)
O
Oleg Tsilyurik, 2016-09-23
@crayes23

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!

C
CityCat4, 2016-09-23
@CityCat4

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 :)

V
Vladimir, 2016-09-23
@Casufi

There is also a wonderful command - man
man kill
man nginx
man ln
All parameters are described there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question