07-03-2020
This commit is contained in:
2
docs/Linux/Apps/AppImage.md
Normal file
2
docs/Linux/Apps/AppImage.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# AppImage
|
||||
|
||||
1
docs/Linux/Apps/flatpak.md
Normal file
1
docs/Linux/Apps/flatpak.md
Normal file
@@ -0,0 +1 @@
|
||||
# flatpak
|
||||
1
docs/Linux/Apps/snap.md
Normal file
1
docs/Linux/Apps/snap.md
Normal file
@@ -0,0 +1 @@
|
||||
# snap
|
||||
@@ -1,24 +1,40 @@
|
||||
# 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
|
||||
$ ls > liste.txt
|
||||
```
|
||||
|
||||
|
||||
|
||||
Redirige la sortie standart vers un fichier (ajoute à la suite):
|
||||
Redirige la <u>sortie standart</u> vers un fichier (ajoute à la suite):
|
||||
|
||||
```bash
|
||||
$ 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):
|
||||
|
||||
@@ -26,6 +42,30 @@ Considère liste.txt comme entrée standart (au lieu du clavier):
|
||||
$ 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
|
||||
@@ -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
|
||||
|
||||
Rediriger les erreurs vers un fichier:
|
||||
Rediriger les <u>erreurs</u> vers un fichier:
|
||||
|
||||
```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
|
||||
$ 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:
|
||||
|
||||
```bash
|
||||
$ 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
|
||||
```
|
||||
|
||||
|
||||
@@ -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**
|
||||
|
||||
```bash
|
||||
aptitude search '~U' ✔ 528 09:00:01
|
||||
aptitude search '~U'
|
||||
i A python-pip-whl - Python package installer
|
||||
i python3-pip - Python package installer
|
||||
```
|
||||
@@ -45,7 +45,7 @@ i python3-pip - Python package instal
|
||||
**apt list --upgradable**
|
||||
|
||||
```bash
|
||||
apt list --upgradable SIGINT(2) ↵ 530 12:38:06
|
||||
apt list --upgradable
|
||||
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]
|
||||
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 }'**
|
||||
|
||||
```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
|
||||
python-pip-whl
|
||||
```
|
||||
@@ -62,7 +62,7 @@ python-pip-whl
|
||||
**sudo apt-get -V -u upgrade**
|
||||
|
||||
```bash
|
||||
sudo apt-get -V -u upgrade 100 ↵ 534 12:47:00
|
||||
sudo apt-get -V -u upgrade
|
||||
[sudo] password for bruno:
|
||||
Lecture des listes de paquets... Fait
|
||||
Construction de l'arbre des dépendances
|
||||
@@ -86,7 +86,7 @@ Souhaitez-vous continuer ? [O/n]
|
||||
**sudo apt-get -s -V -u upgrade**
|
||||
|
||||
```bash
|
||||
sudo apt-get -s -V -u upgrade 1 ↵ 539 13:14:22
|
||||
sudo apt-get -s -V -u upgrade
|
||||
Lecture des listes de paquets... Fait
|
||||
Construction de l'arbre des dépendances
|
||||
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**
|
||||
|
||||
```bash
|
||||
sudo apt-get dist-upgrade </dev/null 100 ↵ 541 13:16:04
|
||||
sudo apt-get dist-upgrade </dev/null
|
||||
Lecture des listes de paquets... Fait
|
||||
Construction de l'arbre des dépendances
|
||||
Lecture des informations d'état... Fait
|
||||
@@ -139,7 +139,7 @@ Souhaitez-vous continuer ? [O/n] Annulation.
|
||||
**apt list --upgradable**
|
||||
|
||||
```bash
|
||||
apt list --upgradable ✔ 520 08:27:27
|
||||
apt list --upgradable
|
||||
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]
|
||||
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**
|
||||
|
||||
```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
|
||||
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**
|
||||
|
||||
```bash
|
||||
sudo apt-get -qq update && apt-get -qq -s upgrade 100 ↵ 547 13:23:11
|
||||
sudo apt-get -qq update && apt-get -qq -s upgrade
|
||||
NOTE: Ceci n'est qu'une simulation !
|
||||
apt-get a besoin des privilèges du superutilisateur
|
||||
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>**
|
||||
|
||||
```bash
|
||||
apt-cache show gcc-8-base ✔ 559 15:04:05
|
||||
apt-cache show gcc-8-base
|
||||
Package: gcc-8-base
|
||||
Architecture: amd64
|
||||
Version: 8.3.0-6ubuntu1~18.04.1
|
||||
|
||||
@@ -212,6 +212,8 @@ Installed-Time: 1536489744
|
||||
|
||||
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:
|
||||
|
||||
@@ -62,3 +62,13 @@ L'applicatif est installé ici:
|
||||
$ pip3 install --user --upgrade setuptools
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
$ grep 'ssh' /var/log/messages
|
||||
|
||||
$ tail -n100 /var/log/auth.log
|
||||
```
|
||||
|
||||
|
||||
@@ -636,6 +636,32 @@ $ brew tap <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:
|
||||
@@ -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_NO_INSTALL_CLEANUP`: Si n'est pas mis, `brew cleanup` est lancé tous les 30 jours.
|
||||
|
||||
|
||||
|
||||
### coreutils (GNU Tools)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Installer Perl
|
||||
# Installer Perl
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Python 3 peut s'installer avec Homebrew:
|
||||
$ 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:
|
||||
|
||||
@@ -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**:
|
||||
|
||||
```bash
|
||||
$ pip3 list --outdated --format=columns
|
||||
$ pip3 install mkdocs
|
||||
$ pip list --outdated --format=columns
|
||||
$ pip install mkdocs
|
||||
```
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ Installation utilisateur:
|
||||
|
||||
```bash
|
||||
$ python3 -m site --user-base
|
||||
/Users/bruno/Library/Python/3.6
|
||||
/Users/bruno/Library/Python/3.7
|
||||
```
|
||||
|
||||
[Pipenv](https://docs.pipenv.org)
|
||||
@@ -76,7 +76,7 @@ $ brew reinstall python3 --with-tcl-tk
|
||||
Installer:
|
||||
|
||||
```bash
|
||||
$ pip3 install jupyter
|
||||
$ pip install jupyter
|
||||
```
|
||||
|
||||
Démarrer:
|
||||
@@ -89,15 +89,52 @@ $ jupyter notebook
|
||||
|
||||
### 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
|
||||
|
||||
Il faut installer Mkdocs avec pip dans --user
|
||||
|
||||
```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
|
||||
~/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/):
|
||||
|
||||
```bash
|
||||
$ pip3 install --user mkdocs-material
|
||||
$ pip install --user mkdocs-material
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -2,14 +2,27 @@
|
||||
|
||||
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 serve` - Start the live-reloading docs server.
|
||||
* `mkdocs build` - Build the documentation site.
|
||||
* `mkdocs help` - Print this help message.
|
||||
* `gh-deploy` - Deploy your documentation to GitHub Pages.
|
||||
|
||||
## Project layout
|
||||
|
||||
|
||||
## Project layout:
|
||||
|
||||
```bash
|
||||
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
|
||||
$ cd /Users/bruno/project
|
||||
@@ -128,7 +141,7 @@ scp -P42666 -r ./central_docs bruno@192.168.xxx.xxx:/volume1/web
|
||||
### Installer un thème:
|
||||
|
||||
```bash
|
||||
$ pip install --user mkdocs-cinder
|
||||
$ pip install mkdocs-cinder
|
||||
```
|
||||
|
||||
|
||||
@@ -136,7 +149,7 @@ $ pip install --user mkdocs-cinder
|
||||
### Mettre à jour un thème:
|
||||
|
||||
```bash
|
||||
$ pip install --user --upgrade mkdocs-material
|
||||
$ pip install --upgrade mkdocs-material
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user