[CLI ] Terminal Flashcards

1
Q

Revenir dans le “home”

A

cd ou cd~

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Revenir au répertoire parent

A

cd ..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Lister les fichiers/répertoires présents dans le dossier actuel

A

ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Indiquer le chemin actuel

A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Créer un répertoire

A

mkdir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

créer un fichier

A

touch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Supprimer un répertoire vide

A

rmdir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Copier un fichier

A

cp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Copier un répertoire et tout son contenu

A

cp -R

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Montrer toute l’arborescence enfant

.
├── juste-prix
│ └── index.html
├── simple-calculator
│ └── index.html
└── wild-project
├── another_file.html
├── not_same_file.html
├── README.md
└── same_file.html

A

find ou tree (à installer avant)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

supprimer un fichier ou un dossier vide

A

rm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Déplacer / renommer / déplacer et renommer un fichier ou un dossier

A

mv

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Filtrer une liste de résultats

A

grep

exemple : find . | grep ‘jpg’
=> recherche toutes les images dans le projet dans lequel on se trouve

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Afficher le contenu d’un fichier texte

A

cat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly