05.03.2014 Views

Chapitre 1 - IPNL - IN2P3

Chapitre 1 - IPNL - IN2P3

Chapitre 1 - IPNL - IN2P3

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

$ cp titi subdir1<br />

$ ls subdir1<br />

tata titi toto<br />

$ cp -r subdir1 subdir2<br />

$ ls -l<br />

total 2<br />

drwxr-sr-x 2 ollivier<br />

drwxr-sr-x 2 ollivier<br />

-rwxr-x--- 1 ollivier<br />

-rw------- 1 ollivier<br />

$ ls subdir2<br />

tata titi toto<br />

$ mv subdir2 subdir3<br />

$ ls -l<br />

total 2<br />

drwxr-sr-x 2 ollivier<br />

drwxr-sr-x 2 ollivier<br />

-rwxr-x--- 1 ollivier<br />

512 Sep 24 09:21 subdir1<br />

512 Sep 24 09:21 subdir2<br />

0 Sep 16 10:19 titi<br />

0 Sep 24 09:19 toto<br />

512 Sep 24 09:21 subdir1<br />

512 Sep 24 09:21 subdir3<br />

0 Sep 16 10:19 titi<br />

-rw------- 1 ollivier 0 Sep 24 09:19 toto<br />

$ cp -i toto subdir3<br />

overwrite subdir3/toto? y<br />

$ rm -i toto<br />

rm: remove toto? y<br />

$ ls<br />

subdir1 subdir3 titi<br />

$ rm -ir subdir3<br />

rm: remove subdir3/toto? y<br />

rm: remove subdir3/tata? y<br />

rm: remove subdir3/titi? y<br />

rm: remove subdir3? y<br />

________________________________________________________________<br />

Quelques autres commandes concernant les fichiers<br />

touch<br />

touch fichier : effectuer une mise à jour de la date d'un fichier. Ne modifie pas le contenu.<br />

Si le fichier n'existe pas, crée un fichier vide.<br />

ln<br />

ln [–s] fichier-existant nom-du-lien : crée un fichier de nom nom-du-lien qui est un<br />

pointage vers un fichier réel ; sert à voir en plusieurs points de l’arborescence un fichier<br />

sans le dupliquer.<br />

• -s : crée un lien symbolique. Si le lien est effacé le fichier réel n’est pas affecté.<br />

C’est le mode le plus utilisé.<br />

Recherche de fichiers<br />

Plusieurs utilitaires permettent de rechercher un fichier dans une arborescence UNIX<br />

relativement complexe.<br />

- 21 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!