je veux jad stp
This commit is contained in:
159
tp01
Normal file
159
tp01
Normal file
@@ -0,0 +1,159 @@
|
||||
edmondal@salle224-08 DIR11]$ cd
|
||||
[edmondal@salle224-08 ~]$ cd
|
||||
[edmondal@salle224-08 ~]$ cd AA
|
||||
bash: cd: AA: No such file or directory
|
||||
[edmondal@salle224-08 ~]$ cd scr
|
||||
[edmondal@salle224-08 scr]$ ls
|
||||
TPO1
|
||||
[edmondal@salle224-08 scr]$ cd TPO1
|
||||
[edmondal@salle224-08 TPO1]$ touch bob-tp01-reponse.txt
|
||||
[edmondal@salle224-08 TPO1]$ ls
|
||||
AA bob-tp01-reponse.txt
|
||||
[edmondal@salle224-08 TPO1]$ cd AA
|
||||
[edmondal@salle224-08 AA]$ cd DIR2
|
||||
[edmondal@salle224-08 DIR2]$ touch fi21
|
||||
[edmondal@salle224-08 DIR2]$ cd
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1/AA/DIR3
|
||||
[edmondal@salle224-08 DIR3]$ touch fi31
|
||||
[edmondal@salle224-08 DIR3]$ touch fi32
|
||||
[edmondal@salle224-08 DIR3]$ ls
|
||||
fi31 fi32
|
||||
[edmondal@salle224-08 DIR3]$ cd
|
||||
[edmondal@salle224-08 ~]$ pwd
|
||||
/export/home/info-but25/edmondal
|
||||
[edmondal@salle224-08 ~]$ cd /scr/TPO1
|
||||
bash: cd: /scr/TPO1: No such file or directory
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1
|
||||
[edmondal@salle224-08 TPO1]$ pwd
|
||||
/export/home/info-but25/edmondal/scr/TPO1
|
||||
[edmondal@salle224-08 TPO1]$ id
|
||||
uid=24533(edmondal) gid=10113(info-etu-but-2025) groups=10113(info-etu-but-2025),10017(domain users),10070(iutsf),10071(iutsf-etu),10073(upec),10074(upec-etu),10076(info),10077(info-etu),10079(info-etu-but),100001(BUILTIN\users)
|
||||
[edmondal@salle224-08 TPO1]$ whoere
|
||||
bash: whoere: command not found
|
||||
[edmondal@salle224-08 TPO1]$ whoami
|
||||
edmondal
|
||||
[edmondal@salle224-08 TPO1]$ ls DIR3
|
||||
ls: cannot access 'DIR3': No such file or directory
|
||||
[edmondal@salle224-08 TPO1]$ cd
|
||||
[edmondal@salle224-08 ~]$ fi21
|
||||
bash: fi21: command not found
|
||||
[edmondal@salle224-08 ~]$ pritenv HOME
|
||||
bash: pritenv: command not found
|
||||
[edmondal@salle224-08 ~]$ printenv HOME
|
||||
/export/home/info-but25/edmondal
|
||||
[edmondal@salle224-08 ~]$ fi21
|
||||
bash: fi21: command not found
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1/AA/DIR3
|
||||
[edmondal@salle224-08 DIR3]$ ls
|
||||
fi31 fi32
|
||||
[edmondal@salle224-08 DIR3]$ cd
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1/AA/DIR11
|
||||
bash: cd: scr/TPO1/AA/DIR11: No such file or directory
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1/AA/DIR1/DRI11
|
||||
bash: cd: scr/TPO1/AA/DIR1/DRI11: No such file or directory
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1/AA/DIR1/DRI11/
|
||||
bash: cd: scr/TPO1/AA/DIR1/DRI11/: No such file or directory
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1/AA/DIR3
|
||||
[edmondal@salle224-08 DIR3]$ cd scr/TPO1/AA/DIR3
|
||||
bash: cd: scr/TPO1/AA/DIR3: No such file or directory
|
||||
[edmondal@salle224-08 DIR3]$ cd scr/TPO1/AA/DIR3
|
||||
bash: cd: scr/TPO1/AA/DIR3: No such file or directory
|
||||
[edmondal@salle224-08 DIR3]$
|
||||
[edmondal@salle224-08 DIR3]$ cd
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1/AA/DIR1/DRI11
|
||||
bash: cd: scr/TPO1/AA/DIR1/DRI11: No such file or directory
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1/AA/DIR1/DRI11
|
||||
bash: cd: scr/TPO1/AA/DIR1/DRI11: No such file or directory
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1/AA/DIR1
|
||||
[edmondal@salle224-08 DIR1]$ ls
|
||||
DIR11
|
||||
[edmondal@salle224-08 DIR1]$ cd DIR11
|
||||
[edmondal@salle224-08 DIR11]$ ls
|
||||
fi111 fi112
|
||||
[edmondal@salle224-08 DIR11]$ pwd
|
||||
/export/home/info-but25/edmondal/scr/TPO1/AA/DIR1/DIR11
|
||||
[edmondal@salle224-08 DIR11]$ cd
|
||||
[edmondal@salle224-08 ~]$ cd scr/TPO1
|
||||
[edmondal@salle224-08 TPO1]$ ls DIR3
|
||||
ls: cannot access 'DIR3': No such file or directory
|
||||
[edmondal@salle224-08 TPO1]$ cd
|
||||
[edmondal@salle224-08 ~]$ printenv HOME
|
||||
/export/home/info-but25/edmondal
|
||||
[edmondal@salle224-08 ~]$ man mkdir
|
||||
[edmondal@salle224-08 ~]$ man mkdir
|
||||
[edmondal@salle224-08 ~]$ man mkdir
|
||||
[edmondal@salle224-08 ~]$ man ls
|
||||
|
||||
jai essayer plusieur commande en essayant de mamuser a creer des dossier
|
||||
donc on a la commande ls qui nous permet de pouvoir voir le contenu du dossier
|
||||
la commande cd qui nous permet de rentrer dans ce dossier la commande mkdir qui nous permet
|
||||
de creer un dossier et la commande touch nous permet de creer un ficher tout sa depuis le terminal.
|
||||
la commande printenv HOME nous permet de retourner dans le principal
|
||||
|
||||
mkdir -p
|
||||
|
||||
nous permet de creer un abre le (-p) nous permet de creer plusieur repertoire d'un coup donc
|
||||
mkdir -p SCR/TPO1/AA/DIR1/DIR11
|
||||
les repertoire n'existe pas mais -p va les creer
|
||||
|
||||
2) pour creer les repertoires il faut aller directement dans les repertoires
|
||||
existant -p ne peut que creer des repertoires qui n'exite pas
|
||||
|
||||
mkdir AA/DIR2 AA/DIR3
|
||||
|
||||
la commande touch n'est pas fait pour creer un ficher mais quand on utilise:
|
||||
touch ....
|
||||
la commande touch va creer un ficher seulment si il n'existe pas
|
||||
touch AA/DIR1/DIR11/FI111
|
||||
touch AA/DIR1/DIR11/fi112
|
||||
touch AA/DIR2/fi21
|
||||
touch AA/DIR3/fi31
|
||||
touch AA/DIR3/fi32
|
||||
|
||||
3.1 ls-la AA/DIR3 AA/DIR1/DR11
|
||||
2 la commande cp c'est la commande qui nous permet de copier un ficher
|
||||
cp AA/DIR3/fi31 AA/DIR2/
|
||||
cp AA/DIR3/fi31 AA/DIR1/fi11
|
||||
cp AA/DIR3/fi31 AA/DIR3/fi31cp
|
||||
|
||||
|
||||
la commande (mv) nous permet de deplacer un ficher mv veut dire move
|
||||
5. mv AA/DIR3/fi31 AA/DIR1/DIR11
|
||||
6. mv AA/DIR3/fi3cp AA/DIR3/fi31
|
||||
la commande mv peut creer un nouveau nom pour un fichier
|
||||
7.mv AA/DIR3/fi32 AA/DIR1/DIR11/fi113
|
||||
|
||||
pour copier des repertoire on a besoin de tout copier
|
||||
pour copier des repertoire on a besoin d'utiliser l'option -r donc cp -r
|
||||
8. cp -r AA BB
|
||||
|
||||
4) cd BB/DIR1/DIR11
|
||||
1. mv fi113 ../../DIR3/fi32
|
||||
mv ../../DIR3/fi31/ ../../DIR3/fi31cp
|
||||
mv fi31 ../../DIR3
|
||||
rm ../../DIR3/fi31cp
|
||||
rm ../fi11
|
||||
rm ../../DIR3/fi31
|
||||
|
||||
|
||||
une commande qui permet de changer les perm d'un fichier c'est
|
||||
chmod
|
||||
u+x nous permet de donner une perm d'execution
|
||||
u-x enlever des perm
|
||||
g+x donner des perm a tout le groupe
|
||||
il faut faire chmod ... ajouter ou enlever les perm
|
||||
|
||||
|
||||
2. n'afffiche rien
|
||||
3. alias rm=rm\ -i
|
||||
alias mv= 'mv\ -i'
|
||||
alias cp= "mv -i"
|
||||
|
||||
5. Creer ~/.bashre et y placer des commandes.
|
||||
bonus:
|
||||
alias la= 'ls --color=auto -la'
|
||||
|
||||
alias gap='gcc -ansi -pedentic
|
||||
echo "bonjour!"
|
||||
|
||||
|
Reference in New Issue
Block a user