07-03-2020

This commit is contained in:
2020-03-07 08:26:20 +01:00
parent f760227ba1
commit f9ae910168
13 changed files with 248 additions and 43 deletions

View File

@@ -0,0 +1,2 @@
# AppImage

View File

@@ -0,0 +1 @@
# flatpak

1
docs/Linux/Apps/snap.md Normal file
View File

@@ -0,0 +1 @@
# snap

View File

@@ -1,24 +1,40 @@
# I/O Redirections # I/O Redirections
#### Standard Output
Redirige la sortie standart vers un nouveau fichier:
| | Descripteur | Identifiant |
| --------------- | ----------- | ----------- |
| Entrée standard | stdin | 0 |
| Sortie standard | stdout | 1 |
| Sortie erreur | stderr | 2 |
#### Redirection de sortie: `>`
Redirige la <u>sortie standart</u> vers un nouveau fichier:
```bash ```bash
$ ls > liste.txt $ ls > liste.txt
``` ```
Redirige la <u>sortie standart</u> vers un fichier (ajoute à la suite):
Redirige la sortie standart vers un fichier (ajoute à la suite):
```bash ```bash
$ ls >> liste.txt $ ls >> liste.txt
``` ```
Redirige la <u>sortie erreur</u> vers un fichier:
```bash
>2 erreur.log
```
#### Standard Input
#### Redirection d'entrée: `<`
Considère liste.txt comme entrée standart (au lieu du clavier): Considère liste.txt comme entrée standart (au lieu du clavier):
@@ -26,6 +42,30 @@ Considère liste.txt comme entrée standart (au lieu du clavier):
$ sort < liste.txt $ sort < liste.txt
``` ```
Envoyer un contenu à une commande avec votre clavier.
```bash
$ sort -n << FIN
heredoc… 45
heredoc… 23
heredoc… 12
heredoc… 78
heredoc… 45
heredoc… 9
heredoc… FIN
9
12
23
45
45
78
$ wc -m << STOP
heredoc… Combien de caracteres ?
heredoc… STOP
24
```
#### On peut combiner les 2 #### On peut combiner les 2
@@ -36,23 +76,78 @@ $ sort < liste.txt > liste_triee.txt
#### Rediriger vers un autre descripteur: `>&`
Rediriger la sortie standard sur la sortie d'erreur:
```bash
$ echo "Error" 1>&2
$ echo "Error" >&2
```
#### Le trou noir: `/dev/null`
- si on affiche son contenu, on n'obtient rien.
- si on écrit quelque chose dedans, il disparait.
```bash
$ echo "Bonjour"
Bonjour
$ echo "Bonjour" >/dev/null
```
#### Connecter 2 processus: `|`
La sortie d'un programme est utilisée comme entrée d'un autre.
```bash
$ echo "Hello!" | tr "[:lower:]" "[:upper:]"
HELLO!
```
#### Erreurs #### Erreurs
Rediriger les erreurs vers un fichier: Rediriger les <u>erreurs</u> vers un fichier:
```bash ```bash
$ UneCommande & > fichier-erreurs.txt $ UneCommande 2> fichier-erreurs.txt
``` ```
Rediriger les erreurs vers un fichier (ajoute à la suite):: Rediriger les <u>erreurs</u> vers un fichier (ajouter à la suite)::
```bash ```bash
$ UneCommande & > fichier-erreurs.txt $ UneCommande 2>> erreurs.log
``` ```
Rediriger la <u>sortie standart</u> et les <u>erreurs</u> vers un fichier:
```bash
$ UneCommande 2> erreurs.log
```
Rediriger la sortie et les erreurs vers un fichier: Rediriger la sortie et les erreurs vers un fichier:
```bash ```bash
$ UneCommande 2>&1 | tee fichier.txt $ UneCommande 2>&1 | tee fichier.txt
``` ```
#### Fusionner les sorties
Il est possible de fusionner les sorties (standart et erreur) dans un seul et même fichier.
```bash
$ bad_command >>filename 2>&1
```

View File

@@ -37,7 +37,7 @@ Conf python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all]
**aptitude search '~U' | wc -l** **aptitude search '~U' | wc -l**
```bash ```bash
aptitude search '~U'  ✔  528  09:00:01 aptitude search '~U'
i A python-pip-whl - Python package installer i A python-pip-whl - Python package installer
i python3-pip - Python package installer i python3-pip - Python package installer
``` ```
@@ -45,7 +45,7 @@ i python3-pip - Python package instal
**apt list --upgradable** **apt list --upgradable**
```bash ```bash
apt list --upgradable  SIGINT(2) ↵  530  12:38:06 apt list --upgradable
En train de lister... Fait En train de lister... Fait
python-pip-whl/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1] python-pip-whl/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1]
python3-pip/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1] python3-pip/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1]
@@ -54,7 +54,7 @@ python3-pip/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant
**apt-get -s dist-upgrade | awk '/^Inst/ { print $2 }'** **apt-get -s dist-upgrade | awk '/^Inst/ { print $2 }'**
```bash ```bash
apt-get -s dist-upgrade | awk '/^Inst/ { print $2 }'  ✔  532  12:41:41 apt-get -s dist-upgrade | awk '/^Inst/ { print $2 }'
python3-pip python3-pip
python-pip-whl python-pip-whl
``` ```
@@ -62,7 +62,7 @@ python-pip-whl
**sudo apt-get -V -u upgrade** **sudo apt-get -V -u upgrade**
```bash ```bash
sudo apt-get -V -u upgrade100 ↵  534  12:47:00 sudo apt-get -V -u upgrade
[sudo] password for bruno: [sudo] password for bruno:
Lecture des listes de paquets... Fait Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances Construction de l'arbre des dépendances
@@ -86,7 +86,7 @@ Souhaitez-vous continuer ? [O/n]
**sudo apt-get -s -V -u upgrade** **sudo apt-get -s -V -u upgrade**
```bash ```bash
sudo apt-get -s -V -u upgrade1 ↵  539  13:14:22 sudo apt-get -s -V -u upgrade
Lecture des listes de paquets... Fait Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances Construction de l'arbre des dépendances
Lecture des informations d'état... Fait Lecture des informations d'état... Fait
@@ -118,7 +118,7 @@ Inst python-pip-whl [9.0.1-2.3~ubuntu1] (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/
**apt-get dist-upgrade </dev/null** **apt-get dist-upgrade </dev/null**
```bash ```bash
sudo apt-get dist-upgrade </dev/null100 ↵  541  13:16:04 sudo apt-get dist-upgrade </dev/null
Lecture des listes de paquets... Fait Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances Construction de l'arbre des dépendances
Lecture des informations d'état... Fait Lecture des informations d'état... Fait
@@ -139,7 +139,7 @@ Souhaitez-vous continuer ? [O/n] Annulation.
**apt list --upgradable** **apt list --upgradable**
```bash ```bash
apt list --upgradable  ✔  520  08:27:27 apt list --upgradable
En train de lister... Fait En train de lister... Fait
python-pip-whl/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1] python-pip-whl/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1]
python3-pip/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1] python3-pip/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1]
@@ -167,7 +167,7 @@ A very small modification shows you only the security updates.
**apt-show-versions -u** **apt-show-versions -u**
```bash ```bash
apt-show-versions -u  ✔  548  13:23:23 apt-show-versions -u
python-pip-whl:all/bionic-updates 9.0.1-2.3~ubuntu1 upgradeable to 9.0.1-2.3~ubuntu1.18.04.1 python-pip-whl:all/bionic-updates 9.0.1-2.3~ubuntu1 upgradeable to 9.0.1-2.3~ubuntu1.18.04.1
python3-pip:all/bionic-updates 9.0.1-2.3~ubuntu1 upgradeable to 9.0.1-2.3~ubuntu1.18.04.1 python3-pip:all/bionic-updates 9.0.1-2.3~ubuntu1 upgradeable to 9.0.1-2.3~ubuntu1.18.04.1
``` ```
@@ -175,7 +175,7 @@ python3-pip:all/bionic-updates 9.0.1-2.3~ubuntu1 upgradeable to 9.0.1-2.3~ubuntu
**sudo apt-get -qq update && apt-get -qq -s upgrade** **sudo apt-get -qq update && apt-get -qq -s upgrade**
```bash ```bash
sudo apt-get -qq update && apt-get -qq -s upgrade100 ↵  547  13:23:11 sudo apt-get -qq update && apt-get -qq -s upgrade
NOTE: Ceci n'est qu'une simulation ! NOTE: Ceci n'est qu'une simulation !
apt-get a besoin des privilèges du superutilisateur apt-get a besoin des privilèges du superutilisateur
pour pouvoir vraiment fonctionner. pour pouvoir vraiment fonctionner.
@@ -195,7 +195,7 @@ Conf python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all]
**apt-cache show <paquet>** **apt-cache show <paquet>**
```bash ```bash
apt-cache show gcc-8-base  ✔  559  15:04:05 apt-cache show gcc-8-base
Package: gcc-8-base Package: gcc-8-base
Architecture: amd64 Architecture: amd64
Version: 8.3.0-6ubuntu1~18.04.1 Version: 8.3.0-6ubuntu1~18.04.1

View File

@@ -212,6 +212,8 @@ Installed-Time: 1536489744
https://wiki.openwrt.org/doc/techref/opkg https://wiki.openwrt.org/doc/techref/opkg
[Using GCC for native compilation](https://github.com/Entware/Entware/wiki/Using-GCC-for-native-compilation)
### Ne plus rentrer de mot-de-passe pour opkg: ### Ne plus rentrer de mot-de-passe pour opkg:

View File

@@ -62,3 +62,13 @@ L'applicatif est installé ici:
$ pip3 install --user --upgrade setuptools $ pip3 install --user --upgrade setuptools
``` ```
```bash
$ grep 'ssh' /var/log/messages
$ tail -n100 /var/log/auth.log
```

View File

@@ -636,6 +636,32 @@ $ brew tap <tapname>
$ brew untap <tapname> $ brew untap <tapname>
``` ```
#### Configuration de Homebrew:
```bash
$ brew config
HOMEBREW_VERSION: 2.2.4-6-g7fcae58
ORIGIN: https://github.com/Homebrew/brew
HEAD: 7fcae58af70da20b3be04327ebeebdf236333d27
Last commit: 19 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 91f4df97adc4fcb9459b1a8dbd026c9fa1e45c31
Core tap last commit: 73 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_NO_AUTO_UPDATE: 1
CPU: octa-core 64-bit skylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.25.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 13.0.1
macOS: 10.15.2-x86_64
CLT: N/A
Xcode: 11.3.1
XQuartz: 2.7.11 => /opt/X11
```
### Commandes externes: ### Commandes externes:
@@ -688,6 +714,8 @@ To use the assemblies from other formulae you need to set:
- `HOMEBREW_VERBOSE`: If set, Homebrew always assumes `--verbose` when running commands. - `HOMEBREW_VERBOSE`: If set, Homebrew always assumes `--verbose` when running commands.
- `HOMEBREW_NO_INSTALL_CLEANUP`: Si n'est pas mis, `brew cleanup` est lancé tous les 30 jours.
### coreutils (GNU Tools) ### coreutils (GNU Tools)

View File

@@ -1,4 +1,4 @@
# Installer Perl # Installer Perl

View File

@@ -8,7 +8,7 @@ Python 3 peut s'installer avec Homebrew:
$ brew install python3 $ brew install python3
``` ```
Les extensions Python 3 s'installent dans `/usr/local/lib/python3.6/site-packages/` Les extensions Python 3 s'installent dans `/usr/local/lib/python3.7/site-packages/`
Pour lancer un script Python 3: Pour lancer un script Python 3:
@@ -29,8 +29,8 @@ export PATH=/usr/local/opt/python/libexec/bin:$PATH
Pip est installé d'origine avec Python 3. On le lance avec la commande **pip3**: Pip est installé d'origine avec Python 3. On le lance avec la commande **pip3**:
```bash ```bash
$ pip3 list --outdated --format=columns $ pip list --outdated --format=columns
$ pip3 install mkdocs $ pip install mkdocs
``` ```
@@ -39,7 +39,7 @@ Installation utilisateur:
```bash ```bash
$ python3 -m site --user-base $ python3 -m site --user-base
/Users/bruno/Library/Python/3.6 /Users/bruno/Library/Python/3.7
``` ```
[Pipenv](https://docs.pipenv.org) [Pipenv](https://docs.pipenv.org)
@@ -76,7 +76,7 @@ $ brew reinstall python3 --with-tcl-tk
Installer: Installer:
```bash ```bash
$ pip3 install jupyter $ pip install jupyter
``` ```
Démarrer: Démarrer:
@@ -89,15 +89,52 @@ $ jupyter notebook
### Modules: ### Modules:
#### Global
```bash
$ pip install <module>
```
Les modules s'installent dans `/usr/local/lib/python3.7/site-packages` :
Liste des modules:
```bash
$ pip freeze
appnope==0.1.0
asgiref==3.2.3
backcall==0.1.0
```
#### Local
```bash
$ pip install --user <module>
```
Les modules s'installent dans `/Users/bruno/Library/Python/3.7/lib/python/site-packages/` :
Liste des modules:
```bash
$ pip freeze --user
Click==7.0
tornado==6.0.3
```
#### Mkdocs #### Mkdocs
Il faut installer Mkdocs avec pip dans --user Il faut installer Mkdocs avec pip dans --user
```bash ```bash
$ pip3 install --user mkdocs $ pip install --user mkdocs
``` ```
Mkdocs s'installe dans `'/Users/bruno/Library/Python/3.7/bin'` : Mkdocs s'installe dans `/Users/bruno/Library/Python/3.7/bin` :
```bash ```bash
~/Library/Python/3.7/bin$ ./mkdocs --version ~/Library/Python/3.7/bin$ ./mkdocs --version
@@ -115,7 +152,7 @@ export PATH=/Users/bruno/Library/Python/3.7/bin:$PATH
On installe de la même manière le thème [Material](https://squidfunk.github.io/mkdocs-material/getting-started/): On installe de la même manière le thème [Material](https://squidfunk.github.io/mkdocs-material/getting-started/):
```bash ```bash
$ pip3 install --user mkdocs-material $ pip install --user mkdocs-material
``` ```

View File

@@ -2,14 +2,27 @@
For full documentation visit [mkdocs.org](http://mkdocs.org). For full documentation visit [mkdocs.org](http://mkdocs.org).
## Commands
## Installation:
```bash
$ pip install mkdocs
```
## Commandes:
* `mkdocs new [dir-name]` - Create a new project. * `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server. * `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site. * `mkdocs build` - Build the documentation site.
* `mkdocs help` - Print this help message. * `mkdocs help` - Print this help message.
* `gh-deploy` - Deploy your documentation to GitHub Pages.
## Project layout
## Project layout:
```bash ```bash
mkdocs.yml # The configuration file. mkdocs.yml # The configuration file.
@@ -62,7 +75,7 @@ INFO - Cleaning site directory
## Copier les docs sur le serveur ## Copier les docs sur le serveur:
```bash ```bash
$ cd /Users/bruno/project $ cd /Users/bruno/project
@@ -128,7 +141,7 @@ scp -P42666 -r ./central_docs bruno@192.168.xxx.xxx:/volume1/web
### Installer un thème: ### Installer un thème:
```bash ```bash
$ pip install --user mkdocs-cinder $ pip install mkdocs-cinder
``` ```
@@ -136,7 +149,7 @@ $ pip install --user mkdocs-cinder
### Mettre à jour un thème: ### Mettre à jour un thème:
```bash ```bash
$ pip install --user --upgrade mkdocs-material $ pip install --upgrade mkdocs-material
``` ```

View File

@@ -224,8 +224,12 @@ nav:
theme: theme:
#name: bootstrap #name: bootstrap
name: material name: 'material'
language: fr language: 'fr'
plugins:
- search
- pdf-export
extra_css: extra_css:
- stylesheets/fontawesome-all.css - stylesheets/fontawesome-all.css

View File

@@ -40,7 +40,6 @@ nav:
- Shells: Linux/shell.md - Shells: Linux/shell.md
- SSH: Linux/ssh.md - SSH: Linux/ssh.md
- Tail / Head: Linux/tail-head.md - Tail / Head: Linux/tail-head.md
- Variables: Linux/variables.md
- Divers: Linux/divers.md - Divers: Linux/divers.md
- Linux Mint: - Linux Mint:
- Index: Mint/index.md - Index: Mint/index.md
@@ -57,30 +56,39 @@ nav:
- Serveur web: Mint/webserver.md - Serveur web: Mint/webserver.md
- macos: - macos:
- Index: macos/index.md - Index: macos/index.md
- Bash (exemples): macos/bash_exemples.md
- chflags: macos/chflags.md
- Exécuter un script Bash: macos/executer_shell_script.md
- getfileinfo - setfile: macos/getfileinfo_setfile.md
- Homebrew: - Homebrew:
- homebrew: macos/homebrew/brew.md - homebrew: macos/homebrew/brew.md
- homebrew-cask: macos/homebrew/brew-cask.md - homebrew-cask: macos/homebrew/brew-cask.md
- Mail: macos/Mail.md - Mail: macos/Mail.md
- md5: macos/md5.md
- Node.js: - Node.js:
- Index: macos/node/index.md - Index: macos/node/index.md
- Ghost: macos/node/ghost.md - Ghost: macos/node/ghost.md
- node-js: macos/node/node-js.md - node-js: macos/node/node-js.md
- nvm: macos/node/nvm.md - nvm: macos/node/nvm.md
- Perl:
- Installation: macos/perl/installer.md
- Perl: macos/perl/perl.md
- Python: - Python:
- Index: macos/python/index.md - Index: macos/python/index.md
- Conda: macos/python/conda.md
- Django: macos/python/Django.md - Django: macos/python/Django.md
- pip: macos/python/pip.md - pip: macos/python/pip.md
- Python 3: macos/python/python3.md - Python 3: macos/python/python3.md
- Environnement virtuel: macos/python/virtuel.md - Environnement virtuel: macos/python/virtuel.md
- Ruby: macos/ruby.md
- Sécurité (Gatekeeper): macos/securite.md - Sécurité (Gatekeeper): macos/securite.md
- ssh: - ssh:
- SSH: macos/ssh/ssh.md - SSH: macos/ssh/ssh.md
- passwordless: macos/ssh/ssh-passwordless.md - passwordless: macos/ssh/ssh-passwordless.md
- Terminal:
- chflags: macos/terminal/chflags.md
- Exécuter un script Bash: macos/terminal/executer_shell_script.md
- getfileinfo - setfile: macos/terminal/getfileinfo_setfile.md
- md5: macos/terminal/md5.md
- open: macos/terminal/open.md
- Shebang: macos/terminal/shebang.md
- Terminal: macos/terminal/terminal.md
- you have mail: macos/terminal/youhavemail.md
- Touch ID: macos/TouchID.md - Touch ID: macos/TouchID.md
- WebServer: - WebServer:
- Index: macos/webserver/index.md - Index: macos/webserver/index.md
@@ -94,7 +102,6 @@ nav:
- PHP 7.2: macos/webserver/php72.md - PHP 7.2: macos/webserver/php72.md
- PHP 7.3: macos/webserver/php73.md - PHP 7.3: macos/webserver/php73.md
- Xhprof: macos/webserver/Xhprof.md - Xhprof: macos/webserver/Xhprof.md
- you have mail: macos/youhavemail.md
- Divers: macos/Divers.md - Divers: macos/Divers.md
- Liens: macos/liens.md - Liens: macos/liens.md
- MySQL: - MySQL:
@@ -165,6 +172,10 @@ nav:
- PHP: solus/php.md - PHP: solus/php.md
- Divers: - Divers:
- Index: Divers/index.md - Index: Divers/index.md
- bash:
- Exemples: Divers/bash/bash_exemples.md
- Programmation: Divers/bash/programmation.md
- Tableaux: Divers/bash/tableaux.md
- batch: - batch:
- Commades DOS (1): Divers/batch/Commandes_DOS.md - Commades DOS (1): Divers/batch/Commandes_DOS.md
- Commades DOS (2): Divers/batch/Commandes_DOS_2.md - Commades DOS (2): Divers/batch/Commandes_DOS_2.md
@@ -208,6 +219,7 @@ nav:
- zsh: - zsh:
- Antibody: Divers/zsh/antibody.md - Antibody: Divers/zsh/antibody.md
- zsh: Divers/zsh/zsh.md - zsh: Divers/zsh/zsh.md
- zsh2: Divers/zsh/zsh2.md
- MkDocs: mkdocs.md - MkDocs: mkdocs.md
theme: theme: