Compare commits
8 Commits
db2c0afeaa
...
2d9de35ada
Author | SHA1 | Date |
---|---|---|
waldek | 2d9de35ada | |
waldek | 59cf62432b | |
sarah | 14c83513b1 | |
sarah | c4b6971392 | |
sarah | dac40765f1 | |
sarah | d311571087 | |
sarah | dc813f79c2 | |
sarah | c149957986 |
|
@ -1,11 +1,15 @@
|
|||
openclassroom pour entrainement et video
|
||||
# openclassroom pour entrainement et video
|
||||
|
||||
* Site internet pour ligne de commande [ici](https://ryanstutorials.net/)
|
||||
|
||||
Site internet pour ligne de commande [ici](https://ryanstutorials.net/)
|
||||
## Ligne de commande
|
||||
|
||||
**Ligne de commande**
|
||||
Creation ficher
|
||||
|
||||
```bash
|
||||
touch "nom du file"
|
||||
```
|
||||
|
||||
Creation ficher touch "nom du file"
|
||||
\ : maniere de creer le nom d'un dossier sans qu'il en face plusieurs a cause des espaces
|
||||
|
||||
Editeur de text 'nano' utilé pour la création de text
|
||||
|
@ -14,7 +18,13 @@ Editeur de text 'nano' utilé pour la création de text
|
|||
commande file : determiner le type de ficher sait
|
||||
Chercher le chemin d'un file : which "ficher en question"
|
||||
|
||||
pour renomer ficher : mv "ficher1 " ficher2"
|
||||
pour renomer ficher:
|
||||
|
||||
```bash
|
||||
mv "ficher1 " ficher2"
|
||||
```
|
||||
|
||||
### wildcards
|
||||
|
||||
* - represents zero or more characters
|
||||
? - represents a single character
|
||||
|
@ -26,10 +36,17 @@ touch Picture_ {00..99}.jpg
|
|||
[Pp] pour avoir une liste avec P et p
|
||||
|
||||
|
||||
**Ajouter user**
|
||||
### Ajouter user
|
||||
|
||||
As adding a user to the system is quite invasive, you need to have sufficient privilaged to do so.
|
||||
This can be done eighter as *root* or as by prepending *sudo* to the command.
|
||||
Sudo will execute the command as root.
|
||||
All users you create will have a their *home* at /home/$USER.
|
||||
|
||||
```
|
||||
sudo adduser marie
|
||||
ls /home : voir les users
|
||||
ls /home
|
||||
```
|
||||
changer d'utilisateur via ligne de commande :^su 'nom'
|
||||
|
||||
question : root?
|
||||
|
@ -53,8 +70,6 @@ sarahbis : sudo chown steve:steve mysecretfile pour donner le ownership a une au
|
|||
|
||||
Telecharger site via console : wget "site"
|
||||
|
||||
|
||||
|
||||
Alias pour creer un nouveau raccourci
|
||||
Creer une nouvelle variable : nano .bashrc, #Own command
|
||||
exemple : alias ll="ls-l"
|
||||
|
|
17
Questions.md
17
Questions.md
|
@ -1,7 +1,16 @@
|
|||
Question?
|
||||
# Questions
|
||||
|
||||
regex?
|
||||
Wildcards?
|
||||
Var log msg?
|
||||
## Regex?
|
||||
|
||||
Regex is short for regular expression.
|
||||
[Wikipedia](https://en.wikipedia.org/wiki/Regular_expression) explains it better than me.
|
||||
|
||||
## Wildcards?
|
||||
|
||||
Wildcards are similar to regex but a lot simpler.
|
||||
A quick [tutorial](https://linuxhint.com/bash_wildcard_tutorial/) explains it better than me.
|
||||
|
||||
## Var log msg?
|
||||
|
||||
The debian system administrator gives a good [overview](https://debian-handbook.info/browse/stable/sect.filesystem-hierarchy.html) of the directory structure of the linux OS.
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
Reponse bandit
|
||||
|
||||
bandit 4 : cd inhere | file -- * | cat < -file07
|
||||
|
||||
bandit 5 : du -ab | grep 1033 | cat.maybehere07/.file02
|
||||
|
||||
bandit 6 :find /. -type f -group bandit6 -user bandit -size 33c | cat / ./var/lib/dpkg/info/bandit7.password
|
||||
|
||||
bandit 7 : cat Data.text | grep millionth cvX2JJa4CFALtqS87jk27qwqGhBM9plV
|
||||
|
||||
bandit 8 : sort data.txt | uniq -u code
|
||||
UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR
|
||||
|
||||
bandit 9 : strings data.txt | grep =
|
||||
|
||||
bandit 10 : IFukwKGsFW8MOq3IRFqrxE1hxTNEbUPR
|
|
@ -1,3 +1,5 @@
|
|||
Sites utiles
|
||||
# Sites utiles
|
||||
|
||||
https://ryanstutorials.net/linuxtutorial/filters.php
|
||||
[Ryan's tutorials](https://ryanstutorials.net/linuxtutorial/filters.php)
|
||||
[bandit](https://overthewire.org/wargames/bandit/bandit4.html) ssh wargame
|
||||
[command line challenge](https://cmdchallenge.com/)
|
||||
|
|
Loading…
Reference in New Issue