MaJ du 04-02-2021

This commit is contained in:
2021-02-04 09:55:26 +01:00
parent 84b4e1a85d
commit fb07a20b0c
56 changed files with 4962 additions and 95 deletions

View File

@@ -28,7 +28,7 @@
### Recharger la configuration:
#### Recharger la configuration:
```bash
$ source ~/.profile
@@ -38,4 +38,101 @@ ou
$ . ~/.profile
```
On peut aussi créer un alias: `alias rload=". ~/.profile"`
On peut aussi créer un alias: `alias rload=". ~/.profile"`
#### Historique:
```bash
history
4235* cd perl
4237* git reset
4238* git reset --hard
4239* kymsu2
4242* rm -rf .git
4244* git init
4246* cd
4247* cd Pictures/thumbsup
4248* nano config.json
4249* cd ..
4250* cd thumbsup
4252* 916e
4255 rm .DS_Store
4257 l
4258 nano LICENSE
4259 nano README.md
```
Exécuter une précédente commande (!):
```bash
!4231
916e
bruno@DS916:~ $
```
Executer la commande précédente (!!):
```bash
nano README.md
!!
nano README.md
```
Les 5 dernières commandes:
```
history -5
4253 pwd
4254 hostname
4255 history
4256 nano config.json
4257 history 5
```
Exécuter la dernière commande 'nano':
```bash
!nano
nano config.json
```
Voir la dernière commande 'nano (:p)':
```bash
!nano:p
nano config.json
```
#### "Reverse i" search:
Taper **Ctrl+R** puis 'ssh':
```bash
ssh dsm414
bck-i-search: ssh_
```
Taper à nouveau **Ctrl+R**:
```bash
git clone https://git.php.net/repository/pecl/networking/ssh2.git
bck-i-search: ssh_
```
Quand la bonne commande est trouvée, taper **Enter**. Sinon, taper Ctrl+G pour sortir.
<u>Commentaires interactifs:</u> ajouter #comment pour retrouver plus facilement une commande.
Pour zsh, activer cette fonction avec *setopt interactivecomments*.
```
setopt interactivecomments
ping 192.168.1.8 #nas
PING 192.168.1.8 (192.168.1.8): 56 data bytes
ping 192.168.1.8 #nas
bck-i-search: nas_
```