unix pour débutant. applications en directnavigateurcourriermode consolefenêtrage http smtp ssh x...
TRANSCRIPT
![Page 1: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/1.jpg)
UNIXUNIX
Pour débutant
![Page 2: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/2.jpg)
ApplicationsApplications
En direct Navigateur Courrier Mode console Fenêtrage
http smtp ssh X
Protocoles de communicationProtocoles de communication
Windows DirectX
WindowsMax OSLinux serveur
![Page 3: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/3.jpg)
Windows - Linux Windows - Linux Disques - ProcesseursDisques - Processeurs
WindowsMax OSLinux
titus
star6
sshssh
telnetou ssh
/home
/genomics
IGBMC
Windows
ssh
![Page 4: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/4.jpg)
loginlogin
login: ripp password: tres_secret star6_ripp_> star6_ripp_> pwd /home/ripp star6_ripp_> star6_ripp_> logout
![Page 5: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/5.jpg)
Les commandes élémentairesLes commandes élémentaires
pwd ls cat fichier more fichier rm fichier mkdir repertoire rmdir repertoire
![Page 6: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/6.jpg)
...élémentaires toujours,...élémentaires toujours,
mv ancien nouveau cp source destination cd repertoire cd .. chmod 755 fichier rwx r-x r-x chmod 644 fichier rw- r-- r-- chmod 640 fichier rw- r-- ---
![Page 7: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/7.jpg)
...élémentaires encore ?...élémentaires encore ?
alias llt ls -rt setgscope man commande apropos truc
date logout
![Page 8: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/8.jpg)
Une commande, c'est ...Une commande, c'est ...
ls commande UNIX
xplor fichier exécutable (compilation, link)
settex alias
sauvetout shell script
~ripp/prog/coucou avec chemin d'accès explicite
rehash shell built-in command
![Page 9: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/9.jpg)
C'est toujours et uniquement...C'est toujours et uniquement...
un alias taper alias pour les connaitre tous
une Built-In Command du shell utilisé
un fichier qui se trouve dans le path
which commandecommande aliased to quelquechose
commande : shell built-in command
/usr/bin/commande
![Page 10: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/10.jpg)
Un fichier exécutableUn fichier exécutable on le reconnait par
– file fichier coeff alpha executable binay
obtenu par compilation et link– Fortran, C, C++ ... ou fichier système
![Page 11: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/11.jpg)
Un Un shell scriptshell script
sh, ksh, csh, tcsh, tclsh, perl, ............................................. shell que j'aime: tcsh
c'est un fichier texte contenant
.................................. des commandes la première ligne contient le nom du shell
#!/bin/tcsh................. qui est le programme qui interprète vos commandes
![Page 12: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/12.jpg)
... le ... le shell scriptshell script
on y met des commandes on l'exécute en tapant le nom du fichier
– ça crée un sous-process qui exécute
– /etc/csh.cshrc
– ~/.cshrc
– les commandes du fichier
qui oublie tout avant de revenir au process
ou alors (pour les nuls) : source fichier
![Page 13: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/13.jpg)
Le Le pathpath, quand on tape
une commande on exécute
un fichier qui se trouve
sur un disque dans un répertoire cité dans
le pathpath
![Page 14: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/14.jpg)
le le path,path,
est prédefiniecho $path
est modifié par certaines commandessetmolscript
peut être modifié par set path=dir $path addpath dir (rr)
![Page 15: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/15.jpg)
le le path.path.
si vous voulez qu'un fichier
/bidule/chose/fifi
devienne une commande
fifi
deux solutions– addpath /bidule/chose
– ln -s /bidule/chose/fifi ~/bin/fifi
![Page 16: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/16.jpg)
Les plaisirs du lienLes plaisirs du lien
ln -s fichier lien ln -s /home/ripp/moyenne /bin/moy
c'est comme si /home/ripp/moyenne était copié
on fait vraiment comme si /bin/moy existait ls -l /bin/moy (lrwx--... /bin/moy -> /home/ripp/moyenne)
rm /bin/moy (/home/ripp/moyenne reste)
rm /home/ripp/moyenne (le lien, seul, reste)
![Page 17: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/17.jpg)
Input Output Pipeline 1/3Input Output Pipeline 1/3
Un programme « sympa »– lit des données en entrée ( input = stdin)– calcule– écrit les résultats en sortie ( output = stout)– signale les erreurs ( error = stderr)
xplor < fichin > fichout
![Page 18: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/18.jpg)
Input Output Pipeline 2/3Input Output Pipeline 2/3
Si on ne met pas < ou >– l’entrée standart est le clavier– la sortie standart est l’écran– la sortie erreur est aussi l’écran (>2 ou >&)
… mais si on veut que :
la sortie de l’un est l’entrée de l’autre ?
![Page 19: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/19.jpg)
Input Output Pipeline 3/3Input Output Pipeline 3/3
progA < fichin | progB progA | progB | progC > fichou
Attention tous les programmes n’acceptent pas ce mécanisme stdin stdout
Ne pas confondre
entrée standart (avec <) et arguments
![Page 20: UNIX Pour débutant. Applications En directNavigateurCourrierMode consoleFenêtrage http smtp ssh X Protocoles de communication Protocoles de communication](https://reader035.vdocuments.net/reader035/viewer/2022062511/551d9d82497959293b8bbbe5/html5/thumbnails/20.jpg)
... des questions?
... plus de question?
... merci !