os_cp:intro
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| os_cp:intro [2023/03/07 23:20] – jkonczak | os_cp:intro [2026/03/11 23:57] (current) – [Glob names and wildcards] jkonczak | ||
|---|---|---|---|
| Line 22: | Line 22: | ||
| POSIX - a standard (published by IEEE and The Open Group) for operating system interface and environment, | POSIX - a standard (published by IEEE and The Open Group) for operating system interface and environment, | ||
| - | < | + | < |
| - | GNU/Linux | + | Linux, |
| * [[https:// | * [[https:// | ||
| * the kernel of GNU, [[https:// | * the kernel of GNU, [[https:// | ||
| * therefore GNU software is usually run on top of Linux kernel | * therefore GNU software is usually run on top of Linux kernel | ||
| - | * most Linux distributions, | + | * most Linux distributions, |
| + | * some Linux distributions base on free and/or open source software that is neither GNU software nor uses GNU licenses | ||
| - | < | + | </ |
| ==== Shell and vital utilities ==== | ==== Shell and vital utilities ==== | ||
| Line 59: | Line 60: | ||
| * Apple operating systems (e.g. MacOS) ship with modified BSD tools [[https:// | * Apple operating systems (e.g. MacOS) ship with modified BSD tools [[https:// | ||
| * Embedded / resource restrained systems often use [[https:// | * Embedded / resource restrained systems often use [[https:// | ||
| - | * Android uses [[https:// | + | * Android uses [[https:// |
| * For more, see [[https:// | * For more, see [[https:// | ||
| < | < | ||
| - | POSIX standarizes both the [[https:// | + | POSIX standarizes both the [[https:// |
| - | and its vital [[https:// | + | and its vital [[https:// |
| ==== Accessing the shell ==== | ==== Accessing the shell ==== | ||
| Line 78: | Line 79: | ||
| * terminals bundled with some Linux desktop environment: | * terminals bundled with some Linux desktop environment: | ||
| * default MacOS [[https:// | * default MacOS [[https:// | ||
| - | * drop-down terminals: [[https:// | + | * drop-down terminals: [[https:// |
| < | < | ||
| Line 98: | Line 99: | ||
| where '' | where '' | ||
| \\ | \\ | ||
| - | For instance, if used '' | + | For instance, if the user '' |
| + | \\ | ||
| + | To terminate a ssh session, one can use either '' | ||
| Currently all major operating systems (including Windows) provide '' | Currently all major operating systems (including Windows) provide '' | ||
| - | < | + | < |
| Secure SHell encrypts all traffic. Its predecessor – telnet – sends all data (including passwords) in plaintext. | Secure SHell encrypts all traffic. Its predecessor – telnet – sends all data (including passwords) in plaintext. | ||
| - | <html></small></html> | + | Upon password authentication, |
| + | \\ | ||
| + | It is vital for security to confirm the authenticity of the server – the client | ||
| + | must verify that it does not contact a rogue server that can learn the password | ||
| + | ([[https:// | ||
| + | and/or hijack the session. | ||
| + | \\ | ||
| + | [[https:// | ||
| + | is used to this end: the server has a (secret) private key, and upon each | ||
| + | connection it sends the public key to the client, and the client verifies whether | ||
| + | the public key pairs with the private. | ||
| + | \\ | ||
| + | Hence, upon the first connection to a new server the SSH client program requests | ||
| + | the user to verify the authenticity of the public key and stores the key (in | ||
| + | OpenSSH in '' | ||
| + | connections. | ||
| + | |||
| + | </small> | ||
| ~~Exercise.# | ~~Exercise.# | ||
| - | ~~Exercise.# | + | ~~Exercise.# |
| ~~Exercise.# | ~~Exercise.# | ||
| - | ~~Exercise.# | + | ~~Exercise.# |
| + | \\ | ||
| + | < | ||
| ===== Getting help ===== | ===== Getting help ===== | ||
| Line 124: | Line 146: | ||
| ~~Exercise.# | ~~Exercise.# | ||
| - | Usually | + | Usually a program comes together |
| ~~Exercise.# | ~~Exercise.# | ||
| Line 132: | Line 154: | ||
| Page names are unique within a section, but there may be pages with the same name in different sections. | Page names are unique within a section, but there may be pages with the same name in different sections. | ||
| \\ | \\ | ||
| - | You may use the **'' | + | You may type **'' |
| ~~Exercise.# | ~~Exercise.# | ||
| - | To select a page from a given section, one has to use '' | + | To select a page from a given section, one has to use '' |
| ~~Exercise.# | ~~Exercise.# | ||
| Line 147: | Line 169: | ||
| < | < | ||
| - | For searching within manual there is also the '' | + | For searching within manual there are also the '' |
| Apart from '' | Apart from '' | ||
| Line 213: | Line 235: | ||
| The command **'' | The command **'' | ||
| \\ | \\ | ||
| - | By default '' | + | By default '' |
| \\ | \\ | ||
| - | Switch **'' | + | Switch **'' |
| ~~Exercise.# | ~~Exercise.# | ||
| Line 241: | Line 263: | ||
| To change directory the command **'' | To change directory the command **'' | ||
| \\ | \\ | ||
| - | < | + | < |
| ~~Exercise.# | ~~Exercise.# | ||
| Line 256: | Line 278: | ||
| < | < | ||
| + | |||
| + | ==== Wildcard, regex, … ==== | ||
| + | |||
| + | < | ||
| + | |||
| + | In computer science patterns/ | ||
| + | expressed and used to match against some data, usually to find fitting data or | ||
| + | check if the data matches the description. | ||
| + | \\ | ||
| + | For instance, //lines beginning with a word followed by an equals sign// might | ||
| + | be written as a regular expression '' | ||
| + | |||
| + | There are countless syntaxes and implementations of such patterns/ | ||
| + | |||
| + | In the shell, [[https:// | ||
| + | and [[https:// | ||
| + | are commonplace. | ||
| + | |||
| + | Syntax and implementation of both wildcards and regexes is language/ | ||
| + | specific. | ||
| + | \\ | ||
| + | The shell uses syntax summarized e.g., in | ||
| + | '' | ||
| + | '' | ||
| + | |||
| + | </ | ||
| ==== Glob names and wildcards ==== | ==== Glob names and wildcards ==== | ||
| - | Upon parsing the user input, the shell attempts to replace any word containing wildcard characters **'' | + | Upon parsing the user input, the shell attempts to replace |
| + | word containing wildcard characters **'' | ||
| + | square brackets **'' | ||
| + | [[https:// | ||
| - | '' | + | '' |
| + | ''?'' | ||
| + | '' | ||
| + | '' | ||
| If there is at least one file that matches the glob, the shell replaces the glob with all filenames that match. If no file matches, then the glob is left unaltered. | If there is at least one file that matches the glob, the shell replaces the glob with all filenames that match. If no file matches, then the glob is left unaltered. | ||
| Line 269: | Line 323: | ||
| ~~Exercise.# | ~~Exercise.# | ||
| - | ~~Exercise.# | + | ~~Exercise.# |
| - | ~~Exercise.# | + | ~~Exercise.# |
| ~~Exercise.# | ~~Exercise.# | ||
os_cp/intro.1678231259.txt.gz · Last modified: (external edit)