unix raymond ripp. applications en directnavigateurcouriermode consolefenêtrage http hypertext...
TRANSCRIPT
![Page 1: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/1.jpg)
UnixUnix
Raymond Ripp
![Page 2: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/2.jpg)
ApplicationsApplications
En direct Navigateur Courier Mode console FenêtrageHTTP
Hypertext transfer protocol
X-windowsWindows
Protocoles - Langages de programmationProtocoles - Langages de programmation
Windows DirectX
WindowsMax OSLinux serveur
PHPJavaTclC
HTMLJavascriptX
SMTPSimple mail
transfer protocol
SSHSecure shell
![Page 3: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/3.jpg)
Windows - Linux Windows - Linux Disques - ProcesseursDisques - Processeurs
WindowsMac OSLinux
titus
star6
sshssh
ssh
/home
/genomics
IGBMC
WindowsMac OSLinux
ssh
![Page 4: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/4.jpg)
SSH sur star8SSH sur star8
mon_pc_> ssh –l ripp –X titus.u-strasbg.fr titus_ripp_> ssh –l ripp –X star8 star8_ripp_> pwd/groupes/poch/ripp star8_ripp_> cd CoursUnix star8_CoursUnix_> lsMonPremierScript.tcsh star8_CoursTcl_> MonPremierScript.tcsh
![Page 5: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/5.jpg)
Les commandes élémentairesLes commandes élémentaires
cd /home/ripp pwd ls cat /home/ripp/www/fifi.txt more ./www/fifi.txt rm ./www/fifi.txt mkdir /home/ripp/CoursUlp rmdir CoursUlp
![Page 6: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/6.jpg)
...élémentaires toujours,...élémentaires toujours,
mv fifi.txt CoursUlp/toto.txt cp /home/depulp1/p.tcl prog.tcl cd CoursUlp cd .. chmod 755 fichier rwx r-x r-x chmod 644 fichier rw- r-- r-- chmod 640 fichier rw- r-- ---
![Page 7: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/7.jpg)
...élémentaires encore ?...élémentaires encore ?
alias llt ls -rt setgscope man commande apropos truc
date logout
![Page 8: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/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
/home/ripp/p.exe avec chemin d'accès explicite
rehash shell built-in command
![Page 9: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/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 Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/10.jpg)
Un fichier exécutableUn fichier exécutable Fichier de commandes (shell script)
Ou fichier binaire obtenu par compilation et link– Fortran, C, C++ ... ou fichier système
on le reconnait par– son extension (.tcl, .csh, .pl, …)– file fichier coeff alpha executable binay
![Page 11: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/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 Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/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 Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/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 Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/14.jpg)
le le path,path,
est un ensemble de répertoires– qui contient les fichiers exécutables
est prédefiniecho $path
est modifié par certaines commandessetmolscript
peut être modifié par set path=dir $path addpath dir (rr)
![Page 15: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/15.jpg)
le le path.path.
si vous voulez qu'un fichier /bidule/chose/fifi
devienne une commande fifi
trois solutions– addpath /bidule/chose– cp /bidule/chose/fifi /home/bin/fifi
– ln -s /bidule/chose/fifi /home/ripp/bin/fifi
![Page 16: Unix Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/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 Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/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 Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/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 Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/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 Raymond Ripp. Applications En directNavigateurCourierMode consoleFenêtrage HTTP Hypertext transfer protocol X-windows Windows Protocoles - Langages](https://reader031.vdocuments.net/reader031/viewer/2022013100/551d9d82497959293b8bbbdf/html5/thumbnails/20.jpg)
... des questions?
... plus de question?
... merci !