<-Back to home
<-Page à Aurélie
<- Computer cheat sheet
<- Fiche Info

Quelques sympathiques commandes linux / A few useful linux commands...

To create an archive file: tar -cvf mytar.tar file1 file2 ...
To untar: tar xvf mytar.tar
(Réécrit par dessus tout fichier du répertoire contenu dans le fichier tar)
(Will overwrite any file in the directory that's also contained in the tar file)


To set a path to some directory (tcsh): set path=($path ./directory/direction/...)

To know the path to perl compiler: which perl
And of course- To know the path to any command: which mycommand

Finding a file in a directory: find [directory) -name myFile (default directory is current)


Redirection des flux:
- > log.txt : redirige l'output seul dans log.txt - l'erreur (et le flux 3) apparaissent en sortie standard.
- &> log.txt : redirige tous les flux (output + erreur + autre) dans log.txt

Quand une application est plantée: la tuer avec kill pid (ps fournit sympatiquement le pid)

Complications: "kill pid" ne tue pas l'application -> tenter "kill -9 pid"
  "ps" ne donne pas le pid ! -> le récupérer avec "top"
   
Cas de plantage total: rebooter au clavier
-> Ctrl + Alt + F1
-> taper monLogin pwd maMachine
-> taper reboot
Janvier 2003