Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cours_prog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yassin.elhakoun
cours_prog
Commits
5be2c46f
Commit
5be2c46f
authored
4 years ago
by
orestis.malaspin
Browse files
Options
Downloads
Patches
Plain Diff
added cli tutorial beginning
parent
d91e9f22
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+5
-2
5 additions, 2 deletions
Makefile
command_line.md
+111
-0
111 additions, 0 deletions
command_line.md
figs/terminal_open.png
+0
-0
0 additions, 0 deletions
figs/terminal_open.png
intro.md
+1
-1
1 addition, 1 deletion
intro.md
with
117 additions
and
3 deletions
Makefile
+
5
−
2
View file @
5be2c46f
...
...
@@ -10,7 +10,7 @@ HTMLOPTIONS += -t html5
HTMLOPTIONS
+=
-c
css/tufte-css/tufte.css
HTMLOPTIONS
+=
--self-contained
all
:
delaunay.pdf pointeurs_avances.pdf oral.pdf ligne_commande.pdf strings.pdf tests_assertions.pdf make.pdf base_3.pdf base_2.pdf base_1.pdf intro.pdf index.html
all
:
command_line.pdf
delaunay.pdf pointeurs_avances.pdf oral.pdf ligne_commande.pdf strings.pdf tests_assertions.pdf make.pdf base_3.pdf base_2.pdf base_1.pdf intro.pdf index.html
intro.pdf
:
intro.md metadata.yaml
pandoc
$(
PDFOPTIONS
)
-o
$@
$^
...
...
@@ -42,7 +42,10 @@ oral.pdf: oral.md metadata.yaml
pointeurs_avances.pdf
:
pointeurs_avances.md metadata.yaml
pandoc
$(
PDFOPTIONS
)
-o
$@
$^
delaunay.pdf
:
delaunay.md
delaunay.pdf
:
delaunay.md metadata.yaml
pandoc
$(
PDFOPTIONS
)
-o
$@
$^
command_line.pdf
:
command_line.md metadata.yaml
pandoc
$(
PDFOPTIONS
)
-o
$@
$^
index.html
:
index.md
...
...
This diff is collapsed.
Click to expand it.
command_line.md
0 → 100644
+
111
−
0
View file @
5be2c46f
% Introduction à la l'interface en ligne de commande
% O. Malaspinas
% 16 septembre 2020
# Introduction
## Généralités
*
*Command line interface*
(CLI) en anglais.
*
Interface textuelle vers l'ordinateur.
*
Peut s'appeler le
*shell*
, le
*terminal*
, la
*console*
, ...
*
Semble obscure, mais est très pratique (automatisation de tâches, copier-coller, ...).
*
Vous devrez l'utiliser tout au long de vos études.
*
Existe sous Linux, MacOS, et même Windows (les commandes peuvent varier!).
*
Ici on ne parlera que de
*Linux*
.
# A quoi ça sert?
## Équivalent textuel d'un GUI
Toutes les informations obtenues avec une interface graphique, peuvent être obtenues à l'aide de la ligne de commande (liste loin d'être exhaustive):
*
Changement d'un répertoire:
`cd`
{.bash}
*
Affichage du contenu d'un répertoire:
`ls`
*
Déplacement de fichier:
`mv`
*
Copie de fichier:
`cp`
*
Création de répertoire:
`mkdir`
*
Recherche de fichier:
`find`
*
Recherche de texte dans un fichier:
`grep`
*
Etc, etc, etc, etc, etc
## Mais aussi
*
Télécharger des documents, compiler, éditer des fichiers, ...
# Ouvrir un terminal
Dépendant de votre distribution de Linux l'ouverture d'un terminal peut varier.
Ce qui marche
*presque*
tout le temps:
1.
Appuyer sur le bouton
`Super`
(
`Windows`
) du clavier.
2.
Commencer à taper "terminal".

{#fig:terminal_open width=100%}
Raccourcis clavier:
*
`Ctrl+Alt+T`
*
`Super+T`
*
Vous pouvez customiser les raccourcis.
# Une fois le terminal ouvert
Vous pouvez taper des commandes puis
`Entrée`
.
```
bash
$
pwd
/home/orestis
```
Exemple:
`pwd`
affiche le répertoire courant (
**p**
rint
**w**
orking
**d**
irectory).
**Attention: les commandes sont sensibles à la casse!**
Exemple:
`cd`
change de répertoire (
**c**
hange
**d**
irectory).
:::::::::::::: {.columns}
::: {.column width="45%"}
```
bash
$
pwd
/home/orestis
$
cd
..
$
pwd
/home
```
:::
::: {.column width="45%"}
```
bash
$
cd
orestis
$
pwd
/home/orestis
$
cd
../..
$
pwd
/
```
:::
::::::::::::::
# Remarque: chemins relatifs ou absolus
Lorsqu'on spécifie un
*chemin*
# Quelques commandes utiles
## `ls`
## `mkdir`
This diff is collapsed.
Click to expand it.
figs/terminal_open.png
0 → 100644
+
0
−
0
View file @
5be2c46f
201 KiB
This diff is collapsed.
Click to expand it.
intro.md
+
1
−
1
View file @
5be2c46f
...
...
@@ -87,7 +87,7 @@ Tout le contenu de ce qu'on raconte se trouve sur cyberlearn:
# Questions?
-
N'hésitez pas à poser des
*questions*
, nous sommes là pour ça![^1]
-
N'hésitez pas à poser des
*questions*
, nous sommes là pour ça!
[^1]
-
N'hésitez pas à faire des
*retours*
:
*négatifs*
ou
*positifs*
.
[
^1
]:
Chaque
étudiant·e·s a un quota de 5 questions par semestre.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment