Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
elearning:workbooks:redhat:rh124:l108 [2024/09/25 08:10] adminelearning:workbooks:redhat:rh124:l108 [2024/09/27 10:35] (Version actuelle) admin
Ligne 5: Ligne 5:
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
  
-======RH12409 - Gestion des Processus======+======RH12409 - Gestion de l'Archivage et de la Compression======
  
 =====Contenu du Module===== =====Contenu du Module=====
  
-  * **RH12409 - Gestion des Processus**+  * **RH12409 - Gestion de l'Archivage et de la Compression**
     * Contenu du Module     * Contenu du Module
-    * Présentation +    * Types de Sauvegardes 
-    * Les Types de Processus +      * Sauvegarde complète 
-    * LAB #1 - Les Commandes relatives aux Processus +      * Sauvegarde différentielle 
-      1.1 - La Commande ps +      * Sauvegarde incrémentale 
-      * 1.2 - La Commande pgrep +      * Sauvegarde décrémentale 
-      * 1.3 - La Commande pstree +    * Outils Classiques de Sauvegarde 
-      1.4 La Commande top +      * Préparation 
-      * 1.5 - Les Commandes fg, bg et jobs +      * La Commande tar 
-      * 1.6 - La Commande wait +        * Présentation 
-      1.7 La Commande nice +        * LAB #1 - Travailler avec la Commande tar 
-      * 1.8 - La Commande renice +        * La Commande GPL tar et la Compression 
-      1.9 La Commande nohup +      * La Commande cpio 
-      * 1.10 - La Commande kill +        * Présentation 
-      1.11 - La Commande pkill+        * LAB #2 - Travailler avec la Commande cpio 
 +      * La Commande dd 
 +        Présentation 
 +        * LAB #3 Travailler avec la Commande dd 
 +      * Les Commandes dump et restore 
 +        * Présentation 
 +    * Outils Avancés de Sauvegarde 
 +      * Outils de Sauvegarde Unidirectionnelle 
 +      * Outils de Sauvegarde Multidirectionnelle 
 +      * Outils de Sauvegarde des Partitions 
 +      * LAB #4 Que Sauvegarder en Priorité ? 
 +        * Sauvegarde de la Liste des Paquets 
 +        * Sauvegarde d'un Mémo sur la Structure du Disque Dur Système 
 +        * Sauvegarde d'un Mémo sur les Points de Montage du Disque Dur Système 
 +        * Sauvegarde du Chargeur de Démarrage 
 +          * GRUB Legacy 
 +          * GRUB 2 avec BIOS 
 +          * GRUB 2 avec EFI 
 +        * Sauvegarde des Dossiers Utilisateurs 
 +      * La Commande Rsync 
 +        Présentation 
 +        * LAB #5 Travailler avec la Commande rsync 
 +    * Compression 
 +      * La Commande gzip 
 +        Présentation 
 +        * LAB #6 Travaller avec la Commande gzip 
 +      * La Commande bzip2 
 +        Présentation 
 +        * LAB #7 Travailler avec la Commande bzip2 
 +      * La Commande xz 
 +        * Présentation 
 +        * LAB #8 - Travailler avec la Commande xz 
 +      * Autres Utilitaires
  
-=====Présentation=====+=====Types de Sauvegardes=====
  
-Un processus est un fichier binaire ( binary file ) qui est chargé en mémoire centrale. Une fois chargé la mémoire exécute le programme en langage machine. Quand le programme est chargé, il a besoin du système d’exploitation qui lui fournit des informations pour qu’il puisse s’exécuter correctement. Ces informations sont appelées des **données d’identification**. +====Sauvegarde complète====
  
-L’ensemble des **données d’identification** est appelé l’**environnement de processus** :+Dans ce cas on sauvegarde tous les fichiers et dossiers, toute la partition ou tout le disque :
  
-  * Un numéro de processus unique (PID), +{{ :elearning:workbooks:debian:6:senior:full.png?direct&400 |}}
-  * Un numéro de processus parent (PPID), +
-  * Un numéro d'utilisateur (UID), +
-  * Un numéro de groupe (GID), +
-  * La durée de traitement, +
-  * La priorité du processus, +
-  * Le répertoire de travail actif, +
-  * Les fichiers ouverts.+
  
-Ces informations sont stockés dans le répertoire **/proc**. Le répertoire /proc contient des fichiers et des répertoires virtuels. Le contenu de ces fichiers est créé dynamiquement lors de la consultation. Seul root peut consulter la totalité des informations dans le répertoire /proc. +La restauration nécessite :
  
-Saisissez la commande suivante :+  * La dernière sauvegarde complète.
  
-<code> +Avantage :
-[root@centos8 ~]# cd /proc; ls -d [0-9]* +
-1     1113  1158  1464  1590  1601  163   166  171  20  24  28  303  31   34  38  41  45   461  465  469  473  478  481  487  497  507  52   528  531  599  649  69   765  793  800  827  840  853  875  902 +
-10    1125  12    1465  1594  162   1634  167  18   21  25  29  305  310  35  39  42  457  462  466  47   475  479  482  489  498  508  521  529  532  6    655  7    766  795  801  828  841  854  880  905 +
-11    1126  13    15    16    1627  164   168  19   22  26  3   306  311  36  4   43  459  463  467  470  476  48   484  49      51   526  53   533  60   662  741  779  799  823  834  847  866  884  910 +
-1111  1135  14    1585  1600  1628  165   17      23  27  30  309  32   37  40  44  46   464  468  472  477  480  485  496  50   518  527  530  534  632  666  751  791  8    825  837  850  874  9 +
-</code>+
  
-Chaque répertoire fait référence à un PID d'un processusLes données de l**environnement de processus** y sont présentespar exemple :+  * Restauration plus rapide et plus simple que les restaurations à partir de sauvegardes différentielles et incrémentales. 
 + 
 +Inconvénient : 
 + 
 +  * Nécessite plus d'espace de stockage que les sauvegardes différentielles et incrémentales. 
 + 
 +====Sauvegarde différentielle==== 
 + 
 +Dans ce cas on sauvegarde des données modifiées ou nouvellement ajoutées sur la base de la **dernière sauvegarde complète** : 
 + 
 +{{ :elearning:workbooks:debian:6:senior:diff.png?direct&400 |}} 
 + 
 +La restauration nécessite : 
 + 
 +  * La dernière sauvegarde complète, 
 +  * La dernière sauvegarde différentielle. 
 + 
 +Avantage : 
 + 
 +  * Restauration plus rapide que la restauration à partir d'une sauvegarde incrémentale. 
 + 
 +Inconvénient : 
 + 
 +  * Nécessite plus d'espace de stockage que la sauvegarde incrémentale. 
 + 
 +====Sauvegarde incrémentale==== 
 + 
 +Dans ce cas, on ne sauvegarde que ce qui a changé depuis la dernière sauvegarde quelle qu'elle soit (complète, différentielle ou incrémentale) : 
 + 
 +{{ :elearning:workbooks:debian:6:senior:incr.png?direct&400 |}}  
 + 
 +La restauration nécessite : 
 + 
 +  * La dernière sauvegarde complète, 
 +  * Toutes les sauvegardes incrémentales effectuées depuis, et dans l'ordre. 
 + 
 +Avantage : 
 + 
 +  Sauvegarde plus rapide que la sauvegarde complète ou différentielle, 
 +  Nécessite moins d'espace de stockage que la sauvegarde différentielle. 
 + 
 +Inconvénient : 
 + 
 +  Plus longue à restaurer. 
 + 
 +====Sauvegarde décrémentale==== 
 + 
 +Dans ce cas on sauvegarde tous les fichiers puis on produit une sauvegarde de ce qui a changé depuis la dernière sauvegarde complète. Cette sauvegarde est appelée une sauvegarde décrémentale : 
 + 
 +{{ :elearning:workbooks:debian:6:senior:decr.png?direct&400 |}}  
 + 
 +La restauration nécessite : 
 + 
 +  La dernière sauvegarde complète. 
 + 
 +La restauration de J-1 nécessite : 
 + 
 +  * La dernière sauvegarde complète, 
 +  * La sauvegarde décrémentale J. 
 + 
 +Par exemple pour obtenir un état du système J1 quand on est à J2, il convient de restaurer la sauvegarde complète de J2 qui est en réalité J2+J1 puis la sauvegarde décrémentale -J2. De cette façon et d'une manière mathématique on obtient : J2 + J1 -J2 = J1. 
 + 
 +Avantage : 
 + 
 +  * Restauration plus rapide et plus simple que les restaurations à partir de sauvegardes différentielles et incrémentales. 
 + 
 +Inconvénient : 
 + 
 +  * Nécessite plus de manipulation de données à chaque sauvegarde. 
 + 
 +=====Outils classiques de sauvegarde===== 
 + 
 +====Préparation==== 
 + 
 +Afin de poursuivre, il convient de créer une arborescence à sauvegarder :
  
 <code> <code>
-[root@centos8 proc]# cd ; ls -l+[root@redhat9 ~]# mkdir -p /test/repY; mkdir /test/repZ 
 +[root@redhat9 ~]# cd /test/repYtouch Y1 Y2 Y3 
 +[root@redhat9 repY]# cd /test/repZ; touch Z1 Z2 
 +[root@redhat9 repZ]# ls -lR /test 
 +/test:
 total 0 total 0
-dr-xr-xr-x. 2 root root 0 Jun  3 09:01 attr +drwxr-xr-x. 2 root root 36 Sep 27 07:51 repY 
--rw-r--r--. root root 0 Jun  3 09:02 autogroup +drwxr-xr-xroot root 26 Sep 27 07:51 repZ 
--r--------. 1 root root 0 Jun  3 09:02 auxv + 
--r--r--r--. 1 root root 0 Jun  3 09:01 cgroup +/test/repY
---w-------. 1 root root 0 Jun  3 09:02 clear_refs +total 
--r--r--r--. 1 root root 0 Jun  3 09:01 cmdline +-rw-r--r--. 1 root root 0 Sep 27 07:51 Y1 
--rw-r--r--. 1 root root 0 Jun  3 09:01 comm +-rw-r--r--. 1 root root 0 Sep 27 07:51 Y2 
--rw-r--r--. 1 root root 0 Jun  3 09:02 coredump_filter +-rw-r--r--. 1 root root 0 Sep 27 07:51 Y3 
--r--r--r--. 1 root root 0 Jun  3 09:02 cpu_resctrl_groups + 
--r--r--r--. 1 root root 0 Jun  3 09:02 cpuset +/test/repZ
-lrwxrwxrwx. 1 root root 0 Jun  3 09:02 cwd -> / +total 
--r--------. 1 root root 0 Jun  3 09:01 environ +-rw-r--r--. 1 root root 0 Sep 27 07:51 Z1 
-lrwxrwxrwx. 1 root root 0 Jun  3 09:01 exe -> /usr/lib/systemd/systemd +-rw-r--r--. 1 root root 0 Sep 27 07:51 Z2
-dr-x------. 2 root root 0 Jun  3 09:01 fd +
-dr-x------. 2 root root Jun  3 09:01 fdinfo +
--rw-r--r--. 1 root root 0 Jun  3 09:01 gid_map +
--r--------. 1 root root 0 Jun  3 09:02 io +
--r--r--r--. 1 root root 0 Jun  3 09:02 limits +
--rw-r--r--. 1 root root 0 Jun  3 09:01 loginuid +
-dr-x------. 2 root root 0 Jun  3 09:02 map_files +
--r--r--r--. 1 root root 0 Jun  3 09:01 maps +
--rw-------. 1 root root 0 Jun  3 09:02 mem +
--r--r--r--. 1 root root 0 Jun  3 09:01 mountinfo +
--r--r--r--. 1 root root 0 Jun  3 09:01 mounts +
--r--------. 1 root root 0 Jun  3 09:02 mountstats +
-dr-xr-xr-x. 6 root root 0 Jun  3 09:01 net +
-dr-x--x--x. 2 root root 0 Jun  3 09:02 ns +
--r--r--r--. 1 root root 0 Jun  3 09:02 numa_maps +
--rw-r--r--. 1 root root 0 Jun  3 09:02 oom_adj +
--r--r--r--. 1 root root 0 Jun  3 09:02 oom_score +
--rw-r--r--. 1 root root 0 Jun  3 09:02 oom_score_adj +
--r--------. 1 root root 0 Jun  3 09:02 pagemap +
--r--------. 1 root root 0 Jun  3 09:02 patch_state +
--r--------. 1 root root 0 Jun  3 09:02 personality +
--rw-r--r--. 1 root root 0 Jun  3 09:02 projid_map +
-lrwxrwxrwx. 1 root root 0 Jun  3 09:01 root -> / +
--rw-r--r--. 1 root root 0 Jun  3 09:01 sched +
--r--r--r--. 1 root root Jun  3 09:02 schedstat +
--r--r--r--. 1 root root 0 Jun  3 09:01 sessionid +
--rw-r--r--. 1 root root 0 Jun  3 09:01 setgroups +
--r--r--r--. 1 root root 0 Jun  3 09:02 smaps +
--r--r--r--. 1 root root 0 Jun  3 09:02 smaps_rollup +
--r--------. 1 root root 0 Jun  3 09:02 stack +
--r--r--r--. 1 root root 0 Jun  3 09:01 stat +
--r--r--r--. 1 root root 0 Jun  3 09:02 statm +
--r--r--r--. 1 root root 0 Jun  3 09:01 status +
--r--------. 1 root root 0 Jun  3 09:02 syscall +
-dr-xr-xr-x. 3 root root 0 Jun  3 09:01 task +
--r--r--r--. 1 root root 0 Jun  3 09:02 timers +
--rw-rw-rw-. 1 root root 0 Jun  3 09:02 timerslack_ns +
--rw-r--r--. 1 root root 0 Jun  3 09:01 uid_map +
--r--r--r--. 1 root root 0 Jun  3 09:02 wchan+
 </code> </code>
  
-<WRAP center round important> +====La Commande tar====
-**Important** - Vous n'avez pas besoin de consulter le contenu des fichiers et des répertoires. Il convient tout simplement de savoir que ces données existent. +
-</WRAP>+
  
-=====Les Types de Processus=====+===Présentation===
  
-Il existe trois types de processus :+Le programme **tar** a été originellement prévu pour sauvegarder sur des bandes magnétiques, d'où son nom issu de **tape archiver**.
  
-  * **interactif** qui est lancé par le shell dans une console en premier plan ou en tâche de fond +La commande **tar** peut sauvegarder vers :
-  * **batch** qui est lancé par le système au moment propice +
-  * **daemon** qui est lancé au démarrage par le système ( lpd, dns etc )+
  
-Un processus peut être dans un de neuf états ou //process states// :+  * un fichier spécial, par exemple le nom d'un lecteur de bande, 
 +  * un fichier ordinaire sur disque, 
 +  * la sortie standard pour être utilisé dans un pipe.
  
-  * //user mode// - le processus s'exécute en mode utilisateur, +===Options de la Commande===
-  * //kernel mode//- le processus s'exécute en mode noyau,  +
-  * //waiting// – le processus est en attente pour une ressource autre que le processeur, +
-  * //sleeping// - le processus est endormi, +
-  * //runnable// – le processus dispose de toutes le ressources nécessaire à son exécution sauf le processeur, +
-  * //swap// - le processus est endormi dans la mémoire virtuelle, +
-  * //new// - le processus est nouveau, +
-  * //elected// – le processus a le contrôle du processeur, +
-  * //zombie// – le processus a terminé son exécution et est prêt à mourir.+
  
-=====LAB #1 - Les Commandes relatives aux Processus=====+Les options de la commande tar sont :
  
-====1.1 - La Commande ps====+<code> 
 +[root@redhat9 repZ]# tar --help 
 +Usage: tar [OPTION...] [FILE]... 
 +GNU 'tar' saves many files together into a single tape or disk archive, and can 
 +restore individual files from the archive. 
 + 
 +Examples: 
 +  tar -cf archive.tar foo bar  # Create archive.tar from files foo and bar. 
 +  tar -tvf archive.tar         # List all files in archive.tar verbosely. 
 +  tar -xf archive.tar          # Extract all files from archive.tar. 
 + 
 + Main operation mode: 
 +  -A, --catenate, --concatenate   append tar files to an archive 
 +  -c, --create               create a new archive 
 +      --delete               delete from the archive (not on mag tapes!) 
 +  -d, --diff, --compare      find differences between archive and file system 
 +  -r, --append               append files to the end of an archive 
 +      --test-label           test the archive volume label and exit 
 +  -t, --list                 list the contents of an archive 
 +  -u, --update               only append files newer than copy in archive 
 +  -x, --extract, --get       extract files from an archive 
 + 
 + Operation modifiers: 
 + 
 +      --check-device         check device numbers when creating incremental 
 +                             archives (default) 
 +  -g, --listed-incremental=FILE   handle new GNU-format incremental backup 
 +  -G, --incremental          handle old GNU-format incremental backup 
 +      --hole-detection=TYPE  technique to detect holes 
 +      --ignore-failed-read   do not exit with nonzero on unreadable files 
 +      --level=NUMBER         dump level for created listed-incremental archive 
 +      --no-check-device      do not check device numbers when creating 
 +                             incremental archives 
 +      --no-seek              archive is not seekable 
 +  -n, --seek                 archive is seekable 
 +      --occurrence[=NUMBER]  process only the NUMBERth occurrence of each file 
 +                             in the archive; this option is valid only in 
 +                             conjunction with one of the subcommands --delete, 
 +                             --diff, --extract or --list and when a list of 
 +                             files is given either on the command line or via 
 +                             the -T option; NUMBER defaults to 1 
 +      --sparse-version=MAJOR[.MINOR] 
 +                             set version of the sparse format to use (implies 
 +                             --sparse) 
 +  -S, --sparse               handle sparse files efficiently 
 + 
 + Local file name selection: 
 +      --add-file=FILE        add given FILE to the archive (useful if its name 
 +                             starts with a dash) 
 +  -C, --directory=DIR        change to directory DIR 
 +      --exclude=PATTERN      exclude files, given as a PATTERN 
 +      --exclude-backups      exclude backup and lock files 
 +      --exclude-caches       exclude contents of directories containing 
 +                             CACHEDIR.TAG, except for the tag file itself 
 +      --exclude-caches-all   exclude directories containing CACHEDIR.TAG 
 +      --exclude-caches-under exclude everything under directories containing 
 +                             CACHEDIR.TAG 
 +      --exclude-ignore=FILE  read exclude patterns for each directory from 
 +                             FILE, if it exists 
 +      --exclude-ignore-recursive=FILE 
 +                             read exclude patterns for each directory and its 
 +                             subdirectories from FILE, if it exists 
 +      --exclude-tag=FILE     exclude contents of directories containing FILE, 
 +                             except for FILE itself 
 +      --exclude-tag-all=FILE exclude directories containing FILE 
 +      --exclude-tag-under=FILE   exclude everything under directories 
 +                             containing FILE 
 +      --exclude-vcs          exclude version control system directories 
 +      --exclude-vcs-ignores  read exclude patterns from the VCS ignore files 
 +      --no-null              disable the effect of the previous --null option 
 +      --no-recursion         avoid descending automatically in directories 
 +      --no-unquote           do not unquote input file or member names 
 +      --no-verbatim-files-from   -T treats file names starting with dash as 
 +                             options (default) 
 +      --null                 -T reads null-terminated names; implies 
 +                             --verbatim-files-from 
 +      --recursion            recurse into directories (default) 
 +  -T, --files-from=FILE      get names to extract or create from FILE 
 +      --unquote              unquote input file or member names (default) 
 +      --verbatim-files-from  -T reads file names verbatim (no escape or option 
 +                             handling) 
 +  -X, --exclude-from=FILE    exclude patterns listed in FILE 
 + 
 + File name matching options (affect both exclude and include patterns): 
 + 
 +      --anchored             patterns match file name start 
 +      --ignore-case          ignore case 
 +      --no-anchored          patterns match after any '/' (default for 
 +                             exclusion) 
 +      --no-ignore-case       case sensitive matching (default) 
 +      --no-wildcards         verbatim string matching 
 +      --no-wildcards-match-slash   wildcards do not match '/' 
 +      --wildcards            use wildcards (default for exclusion) 
 +      --wildcards-match-slash   wildcards match '/' (default) 
 + 
 + Overwrite control: 
 + 
 +      --keep-directory-symlink   preserve existing symlinks to directories when 
 +                             extracting 
 +      --keep-newer-files     don't replace existing files that are newer than 
 +                             their archive copies 
 +  -k, --keep-old-files       don't replace existing files when extracting, 
 +                             treat them as errors 
 +      --no-overwrite-dir     preserve metadata of existing directories 
 +      --one-top-level[=DIR]  create a subdirectory to avoid having loose files 
 +                             extracted 
 +      --overwrite            overwrite existing files when extracting 
 +      --overwrite-dir        overwrite metadata of existing directories when 
 +                             extracting (default) 
 +      --recursive-unlink     empty hierarchies prior to extracting directory 
 +      --remove-files         remove files after adding them to the archive 
 +      --skip-old-files       don't replace existing files when extracting, 
 +                             silently skip over them 
 +  -U, --unlink-first         remove each file prior to extracting over it 
 +  -W, --verify               attempt to verify the archive after writing it 
 + 
 + Select output stream: 
 + 
 +      --ignore-command-error ignore exit codes of children 
 +      --no-ignore-command-error   treat non-zero exit codes of children as 
 +                             error 
 +  -O, --to-stdout            extract files to standard output 
 +      --to-command=COMMAND   pipe extracted files to another program 
 + 
 + Handling of file attributes: 
 + 
 +      --atime-preserve[=METHOD]   preserve access times on dumped files, either 
 +                             by restoring the times after reading 
 +                             (METHOD='replace'; default) or by not setting the 
 +                             times in the first place (METHOD='system'
 +      --clamp-mtime          only set time when the file is more recent than 
 +                             what was given with --mtime 
 +      --delay-directory-restore   delay setting modification times and 
 +                             permissions of extracted directories until the end 
 +                             of extraction 
 +      --group=NAME           force NAME as group for added files 
 +      --group-map=FILE       use FILE to map file owner GIDs and names 
 +      --mode=CHANGES         force (symbolic) mode CHANGES for added files 
 +      --mtime=DATE-OR-FILE   set mtime for added files from DATE-OR-FILE 
 +  -m, --touch                don't extract file modified time 
 +      --no-delay-directory-restore 
 +                             cancel the effect of --delay-directory-restore 
 +                             option 
 +      --no-same-owner        extract files as yourself (default for ordinary 
 +                             users) 
 +      --no-same-permissions  apply the user's umask when extracting permissions 
 +                             from the archive (default for ordinary users) 
 +      --numeric-owner        always use numbers for user/group names 
 +      --owner=NAME           force NAME as owner for added files 
 +      --owner-map=FILE       use FILE to map file owner UIDs and names 
 +  -p, --preserve-permissions, --same-permissions 
 +                             extract information about file permissions 
 +                             (default for superuser) 
 +      --same-owner           try extracting files with the same ownership as 
 +                             exists in the archive (default for superuser) 
 +      --sort=ORDER           directory sorting order: none (default), name or 
 +                             inode 
 +  -s, --preserve-order, --same-order 
 +                             member arguments are listed in the same order as 
 +                             the files in the archive 
 + 
 + Handling of extended file attributes: 
 + 
 +      --acls                 Enable the POSIX ACLs support 
 +      --no-acls              Disable the POSIX ACLs support 
 +      --no-selinux           Disable the SELinux context support 
 +      --no-xattrs            Disable extended attributes support 
 +      --selinux              Enable the SELinux context support 
 +      --xattrs               Enable extended attributes support 
 +      --xattrs-exclude=MASK  specify the exclude pattern for xattr keys 
 +      --xattrs-include=MASK  specify the include pattern for xattr keys 
 + 
 + Device selection and switching: 
 + 
 +      --force-local          archive file is local even if it has a colon 
 +  -f, --file=ARCHIVE         use archive file or device ARCHIVE 
 +  -F, --info-script=NAME, --new-volume-script=NAME 
 +                             run script at end of each tape (implies -M) 
 +  -L, --tape-length=NUMBER   change tape after writing NUMBER x 1024 bytes 
 +  -M, --multi-volume         create/list/extract multi-volume archive 
 +      --rmt-command=COMMAND  use given rmt COMMAND instead of rmt 
 +      --rsh-command=COMMAND  use remote COMMAND instead of rsh 
 +      --volno-file=FILE      use/update the volume number in FILE 
 + 
 + Device blocking: 
 + 
 +  -b, --blocking-factor=BLOCKS   BLOCKS x 512 bytes per record 
 +  -B, --read-full-records    reblock as we read (for 4.2BSD pipes) 
 +  -i, --ignore-zeros         ignore zeroed blocks in archive (means EOF) 
 +      --record-size=NUMBER   NUMBER of bytes per record, multiple of 512 
 + 
 + Archive format selection: 
 + 
 +  -H, --format=FORMAT        create archive of the given format 
 + 
 + FORMAT is one of the following: 
 +    gnu                      GNU tar 1.13.x format 
 +    oldgnu                   GNU format as per tar <= 1.12 
 +    pax                      POSIX 1003.1-2001 (pax) format 
 +    posix                    same as pax 
 +    ustar                    POSIX 1003.1-1988 (ustar) format 
 +    v7                       old V7 tar format 
 + 
 +      --old-archive, --portability 
 +                             same as --format=v7 
 +      --pax-option=keyword[[:]=value][,keyword[[:]=value]]... 
 +                             control pax keywords 
 +      --posix                same as --format=posix 
 +  -V, --label=TEXT           create archive with volume name TEXT; at 
 +                             list/extract time, use TEXT as a globbing pattern 
 +                             for volume name 
 + 
 + Compression options: 
 + 
 +  -a, --auto-compress        use archive suffix to determine the compression 
 +                             program 
 +  -I, --use-compress-program=PROG 
 +                             filter through PROG (must accept -d) 
 +  -j, --bzip2                filter the archive through bzip2 
 +  -J, --xz                   filter the archive through xz 
 +      --lzip                 filter the archive through lzip 
 +      --lzma                 filter the archive through xz --format=lzma 
 +      --lzop                 filter the archive through lzop 
 +      --no-auto-compress     do not use archive suffix to determine the 
 +                             compression program 
 +      --zstd                 filter the archive through zstd 
 +  -z, --gzip, --gunzip, --ungzip   filter the archive through gzip 
 +  -Z, --compress, --uncompress   filter the archive through compress 
 + 
 + Local file selection: 
 + 
 +      --backup[=CONTROL]     backup before removal, choose version CONTROL 
 +      --hard-dereference     follow hard links; archive and dump the files they 
 +                             refer to 
 +  -h, --dereference          follow symlinks; archive and dump the files they 
 +                             point to 
 +  -K, --starting-file=MEMBER-NAME 
 +                             begin at member MEMBER-NAME when reading the 
 +                             archive 
 +      --newer-mtime=DATE     compare date and time when data changed only 
 +  -N, --newer=DATE-OR-FILE, --after-date=DATE-OR-FILE 
 +                             only store files newer than DATE-OR-FILE 
 +      --one-file-system      stay in local file system when creating archive 
 +  -P, --absolute-names       don't strip leading '/'s from file names 
 +      --suffix=STRING        backup before removal, override usual suffix ('~' 
 +                             unless overridden by environment variable 
 +                             SIMPLE_BACKUP_SUFFIX) 
 + 
 + File name transformations: 
 + 
 +      --strip-components=NUMBER   strip NUMBER leading components from file 
 +                             names on extraction 
 +      --transform=EXPRESSION, --xform=EXPRESSION 
 +                             use sed replace EXPRESSION to transform file 
 +                             names 
 + 
 + Informative output: 
 + 
 +      --checkpoint[=NUMBER]  display progress messages every NUMBERth record 
 +                             (default 10) 
 +      --checkpoint-action=ACTION   execute ACTION on each checkpoint 
 +      --full-time            print file time to its full resolution 
 +      --index-file=FILE      send verbose output to FILE 
 +  -l, --check-links          print a message if not all links are dumped 
 +      --no-quote-chars=STRING   disable quoting for characters from STRING 
 +      --quote-chars=STRING   additionally quote characters from STRING 
 +      --quoting-style=STYLE  set name quoting style; see below for valid STYLE 
 +                             values 
 +  -R, --block-number         show block number within archive with each message 
 +                             
 +      --show-defaults        show tar defaults 
 +      --show-omitted-dirs    when listing or extracting, list each directory 
 +                             that does not match search criteria 
 +      --show-snapshot-field-ranges 
 +                             show valid ranges for snapshot-file fields 
 +      --show-transformed-names, --show-stored-names 
 +                             show file or archive names after transformation 
 +      --totals[=SIGNAL]      print total bytes after processing the archive; 
 +                             with an argument - print total bytes when this 
 +                             SIGNAL is delivered; Allowed signals are: SIGHUP, 
 +                             SIGQUIT, SIGINT, SIGUSR1 and SIGUSR2; the names 
 +                             without SIG prefix are also accepted 
 +      --utc                  print file modification times in UTC 
 +  -v, --verbose              verbosely list files processed 
 +      --warning=KEYWORD      warning control 
 +  -w, --interactive, --confirmation 
 +                             ask for confirmation for every action 
 + 
 + Compatibility options: 
 + 
 +  -o                         when creating, same as --old-archive; when 
 +                             extracting, same as --no-same-owner 
 + 
 + Other options: 
 + 
 +  -?, --help                 give this help list 
 +      --restrict             disable use of some potentially harmful options 
 +      --usage                give a short usage message 
 +      --version              print program version 
 + 
 +Mandatory or optional arguments to long options are also mandatory or optional 
 +for any corresponding short options. 
 + 
 +The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX. 
 +The version control may be set with --backup or VERSION_CONTROL, values are: 
 + 
 +  none, off       never make backups 
 +  t, numbered     make numbered backups 
 +  nil, existing   numbered if numbered backups exist, simple otherwise 
 +  never, simple   always make simple backups 
 + 
 +Valid arguments for the --quoting-style option are: 
 + 
 +  literal 
 +  shell 
 +  shell-always 
 +  shell-escape 
 +  shell-escape-always 
 +  c 
 +  c-maybe 
 +  escape 
 +  locale 
 +  clocale 
 + 
 +*This* tar defaults to: 
 +--format=gnu -f- -b20 --quoting-style=escape --rmt-command=/etc/rmt 
 +--rsh-command=/usr/bin/ssh 
 +</code> 
 + 
 +===LAB #1 - Travailler avec la Commande tar===
  
-Cette commande affiche les processus de l’utilisateur attaché au terminal :+Vous allez maintenant sauvegarder votre dossier **test** ainsi que son contenu vers un fichier :
  
 <code> <code>
-[root@centos8 1]# cd ~ +[root@redhat9 repZ]# tar cvf /tmp/test.tar /test 
-[root@centos8 ~]# ps +tar: Removing leading `/' from member names 
-    PID TTY          TIME CMD +/test/ 
-   1627 pts/0    00:00:00 su +/test/repY/ 
-   1634 pts/0    00:00:00 bash +/test/repY/Y1 
-   1690 pts/0    00:00:00 ps+/test/repY/Y2 
 +/test/repY/Y3 
 +/test/repZ/ 
 +/test/repZ/Z1 
 +/test/repZ/Z2
 </code> </code>
  
-Pour plus de détails, il convient d'utiliser l'option **-l** :+Pour visualiser la **table of contents** de votre sauvegarde, utilisez la commande suivante :
  
 <code> <code>
-[root@centos8 ~]# ps -l +[root@redhat9 repZ]# tar tvf /tmp/test.tar 
-F S   UID     PID    PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD +drwxr-xr-x root/root         0 2024-09-27 07:51 test/ 
-4 S        1627    1601  0  80   0 - 48967      pts/0    00:00:00 su +drwxr-xr-x root/root         2024-09-27 07:51 test/repY/ 
-4 S        1634    1627  0  80   0 -  6911      pts/0    00:00:00 bash +-rw-r--r-- root/root         2024-09-27 07:51 test/repY/Y1 
-R        1698    1634  0  80   11360      pts/0    00:00:00 ps+-rw-r--r-- root/root         2024-09-27 07:51 test/repY/Y2 
 +-rw-r--r-- root/root         2024-09-27 07:51 test/repY/Y3 
 +drwxr-xr-x root/root         2024-09-27 07:51 test/repZ/ 
 +-rw-r--r-- root/root         2024-09-27 07:51 test/repZ/Z1 
 +-rw-r--r-- root/root         2024-09-27 07:51 test/repZ/Z2
 </code> </code>
  
-On note dans cette sortie :+Afin de créer une sauvegarde incrémentale, vous avez besoin de créer un fichier qui servira de référence de date :
  
-^ F | Drapeaux du processus. La valeur 4 indique que le processus utilise les privilèges de root +<code> 
-^ S | État du processus S (sleeping), R (In run queue), Z (zombie), N (low priority), D (uninterruptible sleep), T (Traced) | +[root@redhat9 repZ]# touch /tmp/dateref 
-^ UID | Numéro de l’Utilisateur | +</code>
-^ PID | Numéro Unique de Processus | +
-^ PPID | PID du processus parent | +
-^ C | Facteur de priorité du processus | +
-^ PRI | Priorité du processus | +
-^ NI | La valeur de nice | +
-^ ADDR | Adresse mémoire du processus | +
-^ SZ | Utilisation de la mémoire virtuelle | +
-^ WCHAN | Nom de la fonction du noyau dans laquelle le processus est endormi | +
-^ TTY | Nom du terminal depuis lequel le processus a été lancé | +
-^ TIME | Durée d'exécution du processus | +
-^ CMD | Commande exécutée |+
  
-Pour visualiser la table des processus, utilisez la commande ps avec les options l et x - la commande affiche tous les processus avec un affichage long :+Modifiez maintenant deux des fichiers de votre arborescence **test** :
  
 <code> <code>
-[root@centos8 ~]# ps lx | more +[root@redhat9 repZ]# echo "CentOS est super \!" > /test/repY/Y1 
-F   UID     PID    PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND + 
-4                  20   0 245540 14252 do_epo Ss   ?          0:01 /usr/lib/systemd/systemd --switched-root --system --deserialize 17 +[root@redhat9 repZ]# echo "RHEL is wonderful \!" > /test/repZ/Z1
-1                  20        0     0 -      S    ?          0:00 [kthreadd] +
-1                   0 -20      0     0 -      I<   ?          0:00 [rcu_gp] +
-1                   0 -20      0     0 -      I<   ?          0:00 [rcu_par_gp] +
-1                  20        0     0 -      I    ?          0:00 [kworker/0:0-events] +
-1                   0 -20      0     0 -      I<   ?          0:00 [kworker/0:0H-kblockd] +
-1                  20        0     0 -      I    ?          0:00 [kworker/0:1-ata_sff] +
-1                  20        0     0 -      I    ?          0:00 [kworker/u8:0-events_unbound] +
-1                   0 -20      0     0 -      I<   ?          0:00 [mm_percpu_wq] +
-1          10        20        0     0 -      S    ?          0:00 [ksoftirqd/0] +
-1          11        20        0     0 -      I    ?          0:00 [rcu_sched] +
-1          12       2 -100  -      0     0 -      S    ?          0:00 [migration/0] +
-5          13       2 -100  -      0     0 -      S    ?          0:00 [watchdog/0] +
-1          14        20        0     0 -      S    ?          0:00 [cpuhp/0] +
-1          15        20        0     0 -      S    ?          0:00 [cpuhp/1] +
-5          16       2 -100  -      0     0 -      S    ?          0:00 [watchdog/1] +
-1          17       2 -100  -      0     0 -      S    ?          0:00 [migration/1] +
-1          18        20        0     0 -      S    ?          0:00 [ksoftirqd/1] +
-1          19        20        0     0 -      I    ?          0:00 [kworker/1:0-memcg_kmem_cache] +
-1          20         0 -20      0     0 -      I<   ?          0:00 [kworker/1:0H] +
-1          21        20        0     0 -      S    ?          0:00 [cpuhp/2] +
-5          22       2 -100  -      0     0 -      S    ?          0:00 [watchdog/2] +
---More--+
 </code> </code>
  
-On note dans cette sortie certaines informations supplémentaires :+Pour procéder à votre sauvegarde incrémentale, vous devez sauvegarder uniquement les fichiers modifiés ou créés depuis la création de votre fichier **/tmp/dateref**. 
  
-^ VSZ | La même chose que SZ dans l'exemple ci-dessus | +Saisissez donc la commande suivante :
-^ RSS | La mémoire utilisée en kilobytes par le processus | +
-^ STAT | La même chose que S dans l'exemple ci-dessus |+
  
 +<code>
 +[root@redhat9 repZ]# tar -cvf /tmp/incremental.tar -N /tmp/dateref /test
 +tar: Removing leading `/' from member names
 +/test/
 +/test/repY/
 +/test/repY/Y1
 +tar: /test/repY/Y2: file is unchanged; not dumped
 +tar: /test/repY/Y3: file is unchanged; not dumped
 +/test/repZ/
 +/test/repZ/Z1
 +tar: /test/repZ/Z2: file is unchanged; not dumped
 +</code>
 +
 +<WRAP center round important 60%>
 +**Important** - Notez l'utilisation de l'option **-N** avec l’argument **/tmp/dateref** qui permet d'identifier les fichiers modifiés ou créés depuis la création de **/tmp/dateref**.
 +</WRAP>
  
-Avec des options a,u et x la commande affiche le résultat suivant :+Contrôlez maintenant le contenu de l'archive **/tmp/incremental.tar** :
  
 <code> <code>
-[root@centos8 ~]# ps aux | more +[root@redhat9 repZ]# tar tvf /tmp/incremental.tar 
-USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND +drwxr-xr-x root/root         2024-09-27 07:51 test
-root            0.6  0.3 245540 14252 ?        Ss   09:01   0:01 /usr/lib/systemd/systemd --switched-root --system --deserialize 17 +drwxr-xr-x root/root         2024-09-27 07:51 test/repY
-root            0.0  0.0      0     0 ?        S    09:01   0:00 [kthreadd] +-rw-r--r-- root/root        20 2024-09-27 07:58 test/repY/Y1 
-root            0.0  0.0      0     0 ?        I<   09:01   0:00 [rcu_gp] +drwxr-xr-x root/root         2024-09-27 07:51 test/repZ
-root            0.0  0.0      0     0 ?        I<   09:01   0:00 [rcu_par_gp] +-rw-r--r-- root/root        21 2024-09-27 07:58 test/repZ/Z1
-root            0.0  0.0      0     0 ?        I    09:01   0:00 [kworker/0:0-events] +
-root           6  0.0  0.0      0     0 ?        I<   09:01   0:00 [kworker/0:0H-kblockd] +
-root           7  0.1  0.0      0     0 ?        I    09:01   0:00 [kworker/0:1-ata_sff] +
-root            0.0  0.0      0     0 ?        I    09:01   0:00 [kworker/u8:0-events_unbound] +
-root            0.0  0.0      0     0 ?        I<   09:01   0:00 [mm_percpu_wq] +
-root          10  0.0  0.0      0     0 ?        S    09:01   0:00 [ksoftirqd/0] +
-root          11  0.0  0.0      0     0 ?        I    09:01   0:00 [rcu_sched] +
-root          12  0.0  0.0      0     0 ?        S    09:01   0:00 [migration/0] +
-root          13  0.0  0.0      0     0 ?        S    09:01   0:00 [watchdog/0] +
-root          14  0.0  0.0      0     0 ?        S    09:01   0:00 [cpuhp/0] +
-root          15  0.0  0.0      0     0 ?        S    09:01   0:00 [cpuhp/1] +
-root          16  0.0  0.0      0     0 ?        S    09:01   0:00 [watchdog/1] +
-root          17  0.0  0.0      0     0 ?        S    09:01   0:00 [migration/1] +
-root          18  0.0  0.0      0     0 ?        S    09:01   0:00 [ksoftirqd/1] +
-root          19  0.0  0.0      0     0 ?        I    09:01   0:00 [kworker/1:0-memcg_kmem_cache] +
-root          20  0.0  0.0      0     0 ?        I<   09:01   0:00 [kworker/1:0H] +
-root          21  0.0  0.0      0     0 ?        S    09:01   0:00 [cpuhp/2] +
-root          22  0.0  0.0      0     0 ?        S    09:01   0:00 [watchdog/2] +
---More--+
 </code> </code>
  
-On note dans cette sortie certaines informations supplémentaires :+Supprimez maintenant le contenu du répertoire **test** :
  
-^ USER | L'utilisateur du processus | +<code> 
-^ %CPU | Ressources du microprocesseur utilisées par le processus | +[root@redhat9 ~]# rm -rf /test/* 
-^ %MEM | Ressources en mémoire vive utilisées par le processus |+</code>
  
-Les options de cette commande sont :+<WRAP center round important 60%> 
 +**Important** - Notez que le système vous permet de supprimer le répertoire **/test/repZ**, or vous vous situez dans ce même répertoire ! 
 +</WRAP> 
 + 
 +Afin de pouvoir restaurer les fichiers de votre première sauvegarde, placez-vous à la racine de votre système et restaurez le contenu de votre répertoire **test** en saisissant la commande tar suivante :
  
 <code> <code>
-[root@centos8 ~]# ps --help all+[root@redhat9 ~]# cd / 
 +[root@redhat9 /]# tar xvf /tmp/test.tar 
 +test/ 
 +test/repY/ 
 +test/repY/Y1 
 +test/repY/Y2 
 +test/repY/Y3 
 +test/repZ/ 
 +test/repZ/Z1 
 +test/repZ/Z2 
 +</code>
  
-Usage: +Constatez maintenant que l'opération s'est bien déroulée :
- ps [options]+
  
-Basic options: +<code> 
- -A, -e               all processes +root@redhat9 /]# ls -lR /test 
- -a                   all with tty, except session leaders +/test: 
-                    all with tty, including other users +total 0 
- -d                   all except session leaders +drwxr-xr-x. 2 root root 36 Sep 27 07:51 repY 
- -N, --deselect       negate selection +drwxr-xr-x. 2 root root 26 Sep 27 07:51 repZ
-  r                   only running processes +
-  T                   all processes on this terminal +
-                    processes without controlling ttys+
  
-Selection by list+/test/repY
- -C <command>         command name +total 0 
- -G, --Group <GID>    real group id or name +-rw-r--r--. 1 root root 0 Sep 27 07:51 Y1 
- -g, --group <group>  session or effective group name +-rw-r--r--. 1 root root 0 Sep 27 07:51 Y2 
- -p, p, --pid <PID>   process id +-rw-r--r--. 1 root root 0 Sep 27 07:51 Y3
-        --ppid <PID>  parent process id +
- -q, q, --quick-pid <PID> +
-                      process id (quick mode) +
- -s, --sid <session>  session id +
- -t, t, --tty <tty>   terminal +
- -u, U, --user <UID>  effective user id or name +
- -U, --User <UID>     real user id or name+
  
-  The selection options take as their argument either+/test/repZ
-    a comma-separated list e.g. '-root,nobody' or +total 0 
-    a blank-separated list e.g. '-p 123 4567'+-rw-r--r--. 1 root root 0 Sep 27 07:51 Z1 
 +-rw-r--r--. 1 root root 0 Sep 27 07:51 Z2 
 +</code>
  
-Output formats: +<WRAP center round important 60%
- -F                   extra full +**Important** Notez qu'à ce stade les fichiers **/test/repY/Y1** et **/test/repZ/Z1** sont vides
- -f                   full-format, including command lines +</WRAP>
-  f, --forest         ascii art process tree +
- -H                   show process hierarchy +
- -j                   jobs format +
-  j                   BSD job control format +
- -l                   long format +
-  l                   BSD long format +
- -M, Z                add security data (for SELinux) +
- -O <format         preloaded with default columns +
-  O <format>          as -O, with BSD personality +
- -o, o, --format <format> +
-                      user-defined format +
-  s                   signal format +
-  u                   user-oriented format +
-  v                   virtual memory format +
-  X                   register format +
- -y                   do not show flags, show rss vsaddr (used with -l) +
-     --context        display security context (for SELinux) +
-     --headers        repeat header lines, one per page +
-     --no-headers     do not print header at all +
-     --cols, --columns, --width <num> +
-                      set screen width +
-     --rows, --lines <num> +
-                      set screen height+
  
-Show threads: +Restaurez maintenant votre archive incrémentale :
-  H                   as if they were processes +
- -L                   possibly with LWP and NLWP columns +
- -m, m                after processes +
- -T                   possibly with SPID column+
  
-Miscellaneous options: +<code> 
- -c                   show scheduling class with -l option +[root@redhat9 /]# tar xvf /tmp/incremental.tar 
-  c                   show true command name +test/ 
-  e                   show the environment after command +test/repY/ 
-  k,    --sort        specify sort order as: [+|-]key[,[+|-]key[,...]] +test/repY/Y1 
-                    show format specifiers +test/repZ/ 
-                    display numeric uid and wchan +test/repZ/Z1 
-  S,    --cumulative  include some dead child process data +</code>
- -y                   do not show flags, show rss (only with -l) +
- -V, V, --version     display version information and exit +
- -w, w                unlimited output width+
  
-        --help <simple|list|output|threads|misc|all> +Constatez maintenant que l'opération s'est bien déroulée :
-                      display help and exit+
  
-For more details see ps(1).+<code> 
 +[root@redhat9 /]# ls -lR /test 
 +/test: 
 +total 0 
 +drwxr-xr-x. 2 root root 36 Sep 27 07:51 repY 
 +drwxr-xr-x. 2 root root 26 Sep 27 07:51 repZ 
 + 
 +/test/repY: 
 +total 4 
 +-rw-r--r--. root root 20 Sep 27 07:58 Y1 
 +-rw-r--r--1 root root  0 Sep 27 07:51 Y2 
 +-rw-r--r--. 1 root root  0 Sep 27 07:51 Y3 
 + 
 +/test/repZ: 
 +total 4 
 +-rw-r--r--. 1 root root 21 Sep 27 07:58 Z1 
 +-rw-r--r--. 1 root root  0 Sep 27 07:51 Z2
 </code> </code>
  
-====1.2 La Commande pgrep====+<WRAP center round important 60%> 
 +**Important** Notez que les fichiers **/test/repY/Y1** et **/test/repZ/Z1** sont maintenant non-vides. 
 +</WRAP>
  
-La commande **pgrep** permet de rechercher un processus en fonction de son nom et d’autres propriétés puis d'afficher son PID sur la sortie standard.+===La Commande GPL tar et la Compression===
  
-Par exemple, la commande suivante affiche le PID du processus sshd appartenant à root :+Dernièrement, la commande tar peut archiver en utilisant des algorithmes de compression : 
 + 
 +^ Algorythme ^ Option de la commande tar ^ 
 +| gzip | z | 
 +| bzip2 | j | 
 +| lzma | J | 
 + 
 +====La Commande cpio==== 
 + 
 +===Présentation=== 
 + 
 +La commande **cpio** (Copy Input To Output). cpio peut gérer les archives au format **tar**. La différence majeure entre tar et cpio est que ce dernier stocke les chemins d'accès aux fichiers sauvgardés en même temps que les fichiers eux-mêmes. Ceci implique que dans le cas où le chemin absolu a été spécifié lors de la sauvegarde, il est impossible de restaurer un fichier à un autre emplacement que son emplacement d'origine. 
 + 
 +Vous allez utiliser maintenant le logiciel **cpio** pour effectuer les sauvegardes et restaurations. 
 + 
 +===Options de la Commande=== 
 + 
 +Les options de la commande **cpio** sont :
  
 <code> <code>
-[root@centos8 ~]# pgrep -u root sshd +[root@redhat9 /]# cpio --help 
-905 +Usage: cpio [OPTION...] [destination-directory] 
-1585+GNU `cpio' copies files to and from archives 
 + 
 +Examples: 
 +  # Copy files named in name-list to the archive 
 +  cpio -o < name-list [> archive] 
 +  # Extract files from the archive 
 +  cpio -i [< archive] 
 +  # Copy files named in name-list to destination-directory 
 +  cpio -p destination-directory < name-list 
 + 
 + Main operation mode: 
 +  -i, --extract              Extract files from an archive (run in copy-in 
 +                             mode) 
 +  -o, --create               Create the archive (run in copy-out mode) 
 +  -p, --pass-through         Run in copy-pass mode 
 +  -t, --list                 Print a table of contents of the input 
 + 
 + Operation modifiers valid in any mode: 
 + 
 +      --block-size=BLOCK-SIZE   Set the I/O block size to BLOCK-SIZE * 512 
 +                             bytes 
 +  -B                         Set the I/O block size to 5120 bytes 
 +  -c                         Identical to "-H newc", use the new (SVR4) 
 +                             portable format. If you wish the old portable 
 +                             (ASCII) archive format, use "-H odc" instead. 
 +  -C, --io-size=NUMBER       Set the I/O block size to the given NUMBER of 
 +                             bytes 
 +  -D, --directory=DIR        Change to directory DIR 
 +      --force-local          Archive file is local, even if its name contains 
 +                             colons 
 +  -H, --format=FORMAT        Use given archive FORMAT 
 +      --quiet                Do not print the number of blocks copied 
 +  -R, --owner=[USER][:.][GROUP]   Set the ownership of all files created to the 
 +                             specified USER and/or GROUP 
 +  -v, --verbose              Verbosely list the files processed 
 +  -V, --dot                  Print a "." for each file processed 
 +  -W, --warning=FLAG         Control warning display. Currently FLAG is one of 
 +                             'none', 'truncate', 'all'. Multiple options 
 +                             accumulate. 
 + 
 + Operation modifiers valid in copy-in and copy-out modes 
 + 
 +  -F, --file=[[USER@]HOST:]FILE-NAME 
 +                             Use this FILE-NAME instead of standard input or 
 +                             output. Optional USER and HOST specify the user 
 +                             and host names in case of a remote archive 
 +  -M, --message=STRING       Print STRING when the end of a volume of the 
 +                             backup media is reached 
 +      --rsh-command=COMMAND  Use COMMAND instead of rsh 
 + 
 + Operation modifiers valid only in copy-in mode: 
 + 
 +  -b, --swap                 Swap both halfwords of words and bytes of 
 +                             halfwords in the data. Equivalent to -sS 
 +  -f, --nonmatching          Only copy files that do not match any of the given 
 +                             patterns 
 +  -I [[USER@]HOST:]FILE-NAME Archive filename to use instead of standard input. 
 +                             Optional USER and HOST specify the user and host 
 +                             names in case of a remote archive 
 +  -n, --numeric-uid-gid      In the verbose table of contents listing, show 
 +                             numeric UID and GID 
 +  -r, --rename               Interactively rename files 
 +  -s, --swap-bytes           Swap the bytes of each halfword in the files 
 +  -S, --swap-halfwords       Swap the halfwords of each word (4 bytes) in the 
 +                             files 
 +      --to-stdout            Extract files to standard output 
 + 
 +  -E, --pattern-file=FILE    Read additional patterns specifying filenames to 
 +                             extract or list from FILE 
 +      --only-verify-crc      When reading a CRC format archive, only verify the 
 +                             checksum of each file in the archive, don'
 +                             actually extract the files 
 + 
 + Operation modifiers valid only in copy-out mode: 
 + 
 +  -A, --append               Append to an existing archive. 
 +      --device-independent, --reproducible 
 +                             Create device-independent (reproducible) archives 
 +      --ignore-devno         Don't store device numbers 
 +  -O [[USER@]HOST:]FILE-NAME Archive filename to use instead of standard 
 +                             output. Optional USER and HOST specify the user 
 +                             and host names in case of a remote archive 
 +      --renumber-inodes      Renumber inodes 
 + 
 + Operation modifiers valid only in copy-pass mode: 
 + 
 +  -l, --link                 Link files instead of copying them, when 
 +                             possible 
 + 
 + Operation modifiers valid in copy-in and copy-out modes: 
 + 
 +      --absolute-filenames   Do not strip file system prefix components from 
 +                             the file names 
 +      --no-absolute-filenames   Create all files relative to the current 
 +                             directory 
 + 
 + Operation modifiers valid in copy-out and copy-pass modes: 
 + 
 +  -0, --null                 Filenames in the list are delimited by null 
 +                             characters instead of newlines 
 +  -a, --reset-access-time    Reset the access times of files after reading 
 +                             them 
 +  -L, --dereference          Dereference  symbolic  links  (copy  the files 
 +                             that they point to instead of copying the links). 
 + 
 + Operation modifiers valid in copy-in and copy-pass modes: 
 + 
 +  -d, --make-directories     Create leading directories where needed 
 +  -m, --preserve-modification-time 
 +                             Retain previous file modification times when 
 +                             creating files 
 +      --no-preserve-owner    Do not change the ownership of the files 
 +      --sparse               Write files with large blocks of zeros as sparse 
 +                             files 
 +  -u, --unconditional        Replace all files unconditionally 
 + 
 +  -?, --help                 give this help list 
 +      --usage                give a short usage message 
 +      --version              print program version 
 + 
 +Mandatory or optional arguments to long options are also mandatory or optional 
 +for any corresponding short options. 
 + 
 +Report bugs to <bug-cpio@gnu.org>.
 </code> </code>
  
-Tandis que la commande suivante affiche tous les PID des processus appartenant à root ou à trainee :+===LAB #2 - Travailler avec la Commande cpio=== 
 + 
 +Dans un premier temps, vous devez utiliser la commande **find** pour construire une liste de fichiers à sauvegarder :
  
 <code> <code>
-[root@centos8 ~]# pgrep -u root,trainee | more +[root@redhat9 /]# find /test > /tmp/cpio.list 
-+[root@redhat9 /]# cat /tmp/cpio.list 
-+/test 
-+/test/repY 
-+/test/repY/Y2 
-+/test/repY/Y3 
-+/test/repY/Y1 
-+/test/repZ 
-10 +/test/repZ/Z2 
-11 +/test/repZ/Z1
-12 +
-13 +
-14 +
-15 +
-16 +
-17 +
-18 +
-20 +
-21 +
-22 +
-23 +
-24 +
-26 +
-27 +
---More--+
 </code> </code>
  
-Les options de cette commande sont :+Sauvegardez maintenant les fichiers et répertoires référencés par le fichier **/tmp/cpio.list** :
  
 <code> <code>
-[root@centos8 ~]# pgrep --help+[root@redhat9 /]# cpio -ov < /tmp/cpio.list > /tmp/test.cpio 
 +/test 
 +/test/repY 
 +/test/repY/Y2 
 +/test/repY/Y3 
 +/test/repY/Y1 
 +/test/repZ 
 +/test/repZ/Z2 
 +/test/repZ/Z1 
 +1 block 
 +</code>
  
-Usage: +Consultez maintenant la **table of contents** de votre sauvegarde :
- pgrep [options] <pattern>+
  
-Options: +<code
- -d, --delimiter <string specify output delimiter +[root@redhat9 /]# cpio -it /tmp/test.cpio 
- -l, --list-name           list PID and process name +/test 
- -a, --list-full           list PID and full command line +/test/repY 
- -v, --inverse             negates the matching +/test/repY/Y2 
- -w, --lightweight         list all TID +/test/repY/Y3 
- -c, --count               count of matching processes +/test/repY/Y1 
- -f, --full                use full process name to match +/test/repZ 
- -g, --pgroup <PGID,...>   match listed process group IDs +/test/repZ/Z2 
- -G, --group <GID,...>     match real group IDs +/test/repZ/Z1 
- -i, --ignore-case         match case insensitively +1 block 
- -n, --newest              select most recently started +</code>
- -o, --oldest              select least recently started +
- -P, --parent <PPID,...>   match only child processes of the given parent +
- -s, --session <SID,...>   match session IDs +
- -t, --terminal <tty,...>  match by controlling terminal +
- -u, --euid <ID,...>       match by effective IDs +
- -U, --uid <ID,...>        match by real IDs +
- -x, --exact               match exactly with the command name +
- -F, --pidfile <file     read PIDs from file +
- -L, --logpidfile          fail if PID file is not locked +
- --ns <PID>                match the processes that belong to the same +
-                           namespace as <pid> +
- --nslist <ns,...>         list which namespaces will be considered for +
-                           the --ns option. +
-                           Available namespaces: ipc, mnt, net, pid, user, uts+
  
- -h, --help     display this help and exit +Supprimez maintenant le répertoire **/test/repY** et son contenu :
- -V, --version  output version information and exit+
  
-For more details see pgrep(1)+<code> 
 +[root@redhat9 /]# rm -rf /test/repY
 </code> </code>
  
-====1.3 - La Commande pstree====+Contrôlez le bon déroulement de la suppression :
  
-Cette commande affiche les processus en forme d'arborescence, démontrant ainsi les processus parents en enfants :+<code> 
 +[root@redhat9 /]# ls -lR /test 
 +/test: 
 +total 0 
 +drwxr-xr-x. 2 root root 26 Sep 27 07:51 repZ 
 + 
 +/test/repZ: 
 +total 4 
 +-rw-r--r--. 1 root root 21 Sep 27 07:58 Z1 
 +-rw-r--r--. 1 root root  0 Sep 27 07:51 Z2 
 +</code> 
 + 
 +Restaurez les fichiers supprimés :
  
 <code> <code>
-[root@centos8 ~]# pstree +[root@redhat9 /]# cpio -ivdum "/test/repY/*" < /tmp/test.cpio 
-systemd─┬─NetworkManager───2*[{NetworkManager}] +/test/repY/Y2 
-        ├─agetty +/test/repY/Y3 
-        ├─atd +/test/repY/Y1 
-        ├─auditd─┬─sedispatch +1 block
-        │        └─2*[{auditd}] +
-        ├─chronyd +
-        ├─crond +
-        ├─dbus-daemon───{dbus-daemon} +
-        ├─dnsmasq───dnsmasq +
-        ├─firewalld───{firewalld} +
-        ├─gssproxy───5*[{gssproxy}] +
-        ├─irqbalance───{irqbalance} +
-        ├─ksmtuned───sleep +
-        ├─lsmd +
-        ├─mcelog +
-        ├─polkitd───7*[{polkitd}] +
-        ├─rngd───4*[{rngd}] +
-        ├─rpcbind +
-        ├─rsyslogd───2*[{rsyslogd}] +
-        ├─smartd +
-        ├─sshd───sshd───sshd───bash───su───bash───pstree +
-        ├─sssd─┬─sssd_be +
-        │      └─sssd_nss +
-        ├─systemd───(sd-pam) +
-        ├─systemd-journal +
-        ├─systemd-logind +
-        ├─systemd-machine +
-        ├─systemd-udevd +
-        └─tuned───3*[{tuned}]+
 </code> </code>
  
-Les options de cette commande sont :+<WRAP center round important 60%> 
 +**Important** - Notez l'utilisation de la chaîne **"/test/repY/*"** qui permet de rechercher uniquement le répertoire **repY** ainsi que les fichiers **Y1**, **Y2** et **Y3** dans l'archive test.cpio. 
 +</WRAP> 
 + 
 +Contrôlez le bon déroulement de la restauration :
  
 <code> <code>
-[root@centos8 ~]# pstree --help +[root@redhat9 /]# ls -lR /test 
-pstreeunrecognized option '--help' +/test: 
-Usagepstree [-acglpsStuZ] [ -h | -H PID ] [ -n | -N type ] +total 0 
-              -A | -G | -U ] [ PID | USER ] +drwxr-xr-x. 2 root root 36 Sep 27 08:10 repY 
-       pstree -V +drwxr-xr-x. 2 root root 26 Sep 27 07:51 repZ 
-Display a tree of processes.+ 
 +/test/repY: 
 +total 4 
 +-rw-r--r--. 1 root root 20 Sep 27 07:58 Y1 
 +-rw-r--r--. 1 root root  0 Sep 27 07:51 Y2 
 +-rw-r--r--1 root root  0 Sep 27 07:51 Y3
  
-  -a, --arguments     show command line arguments +/test/repZ: 
-  -A, --ascii         use ASCII line drawing characters +total 4 
-  -c, --compact       don't compact identical subtrees +-rw-r--r--. 1 root root 21 Sep 27 07:58 Z1 
-  -h, --highlight-all highlight current process and its ancestors +-rw-r--r--root root  0 Sep 27 07:51 Z2
-  -H PID, +
-  --highlight-pid=PID highlight this process and its ancestors +
-  -g, --show-pgids    show process group ids; implies -c +
-  -G, --vt100         use VT100 line drawing characters +
-  -l, --long          don't truncate long lines +
-  -n, --numeric-sort  sort output by PID +
-  -N type, +
-  --ns-sort=type      sort by namespace type (cgroup, ipc, mnt, net, pid, +
-                                              user, uts) +
-  -p, --show-pids     show PIDs; implies -c +
-  -s, --show-parents  show parents of the selected process +
-  -S, --ns-changes    show namespace transitions +
-  -t, --thread-names  show full thread names +
-  -T, --hide-threads  hide threads, show only processes +
-  -u, --uid-changes   show uid transitions +
-  -U, --unicode       use UTF-8 (Unicode) line drawing characters +
-  -V, --version       display version information +
-  -Z, --security-context +
-                      show SELinux security contexts +
-  PID    start at this PID; default is (init) +
-  USER   show only trees rooted at processes of this user+
 </code> </code>
  
-====1.4 - La Commande top====+====La Commande dd====
  
-Cette commande indique les processus en mémoire :+===Présentation=== 
 + 
 +La commande **dd** n'est pas réellement une commande de sauvegarde.  
 + 
 +La commande **dd** copie le fichier passé en entrée dans le fichier de sortie en limitant le nombre d'octets copiés par l'utilisation de deux options : 
 + 
 +  * **count** 
 +    * le nombre 
 +  * **bs** 
 +    * la taille du bloc à copier 
 + 
 +===Options de la Commande=== 
 + 
 +Les options de la commande **dd** sont :
  
 <code> <code>
-[root@centos8 ~]# top+[root@redhat9 /]# dd --help 
 +Usage: dd [OPERAND]... 
 +  or:  dd OPTION 
 +Copy a file, converting and formatting according to the operands.
  
-top - 09:10:02 up 8 min,  1 user,  load average: 0.05, 0.09, 0.08 +  bs=BYTES        read and write up to BYTES bytes at a time (default512); 
-Tasks: 144 total,   1 running, 143 sleeping,   0 stopped,   0 zombie +                  overrides ibs and obs 
-%Cpu(s) 0.1 us,  0.2 sy,  0.0 ni, 99.6 id,  0.0 wa,  0.1 hi,  0.1 si,  0.0 st +  cbs=BYTES       convert BYTES bytes at a time 
-MiB Mem :   3737.7 total,   3249.1 free,    231.4 used   257.2 buff/cache +  conv=CONVS      convert the file as per the comma separated symbol list 
-MiB Swap:   2000.0 total  2000.0 free,      0.0 used.   3280.0 avail Mem +  count=N         copy only N input blocks 
 +  ibs=BYTES       read up to BYTES bytes at a time (default: 512) 
 +  if=FILE         read from FILE instead of stdin 
 +  iflag=FLAGS     read as per the comma separated symbol list 
 +  obs=BYTES       write BYTES bytes at a time (default: 512) 
 +  of=FILE         write to FILE instead of stdout 
 +  oflag=FLAGS     write as per the comma separated symbol list 
 +  seek=N          skip N obs-sized blocks at start of output 
 +  skip=N          skip N ibs-sized blocks at start of input 
 +  status=LEVEL    The LEVEL of information to print to stderr; 
 +                  'none' suppresses everything but error messages
 +                  'noxfer' suppresses the final transfer statistics, 
 +                  'progress' shows periodic transfer statistics
  
-    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                                 +N and BYTES may be followed by the following multiplicative suffixes: 
-      root      20    245540  14260   9308 S   0.  0.4   0:01.64 systemd                                                                                                                                                                 +c=1, w=2, b=512, kB=1000, K=1024, MB=1000*1000, M=1024*1024, xM=M, 
-    827 polkitd   20   0 1764748  25376  17348 S   0.2   0.7   0:00.12 polkitd                                                                                                                                                                 +GB=1000*1000*1000, G=1024*1024*1024, and so on for T, P, E, Z, Y
-    834 dbus      20     64684   5476   4480 S   0.2   0.1   0:00.20 dbus-daemon                                                                                                                                                             +Binary prefixes can be used, tooKiB=K, MiB=M, and so on
-   1789 root      20     65420   4464   3764 R   0.2   0.1   0:00.03 top                                                                                                                                                                     + 
-      2 root      20              0      0 S   0.0   0.0   0:00.00 kthreadd                                                                                                                                                                +Each CONV symbol may be
-      3 root       0 -20            0      0 I   0.0   0.0   0:00.00 rcu_gp                                                                                                                                                                  + 
-      4 root       0 -20            0      0 I   0.0   0.0   0:00.00 rcu_par_gp                                                                                                                                                              +  ascii     from EBCDIC to ASCII 
-      6 root       -20            0      0 I   0.0   0.0   0:00.00 kworker/0:0H-kblockd                                                                                                                                                    +  ebcdic    from ASCII to EBCDIC 
-      7 root      20   0            0      0 I   0.0   0.0   0:00.47 kworker/0:1-mm_percpu_wq                                                                                                                                                +  ibm       from ASCII to alternate EBCDIC 
-      9 root       0 -20            0      0 I   0.0   0.0   0:00.00 mm_percpu_wq                                                                                                                                                            +  block     pad newline-terminated records with spaces to cbs-size 
-     10 root      20              0      0 S   0.0   0.0   0:00.00 ksoftirqd/                                                                                                                                                            +  unblock   replace trailing spaces in cbs-size records with newline 
-     11 root      20              0      0 I   0.0   0.0   0:00.09 rcu_sched                                                                                                                                                               +  lcase     change upper case to lower case 
-     12 root      rt              0      0 S   0.0   0.0   0:00.00 migration/                                                                                                                                                            +  ucase     change lower case to upper case 
-     13 root      rt              0      0 S   0.0   0.0   0:00.00 watchdog/                                                                                                                                                             +  sparse    try to seek rather than write all-NUL output blocks 
-     14 root      20              0      0 S   0.0   0.0   0:00.00 cpuhp/                                                                                                                                                                +  swab      swap every pair of input bytes 
-     15 root      20              0      0 S   0.0   0.0   0:00.00 cpuhp/                                                                                                                                                                +  sync      pad every input block with NULs to ibs-size; when used 
-     16 root      rt              0      0 S   0.0   0.0   0:00.00 watchdog/                                                                                                                                                             +            with block or unblock, pad with spaces rather than NULs 
-     17 root      rt   0            0      0 S   0.0   0.0   0:00.00 migration/                                                                                                                                                            +  excl      fail if the output file already exists 
-     18 root      20   0            0      0 S   0.0   0.0   0:00.00 ksoftirqd/                                                                                                                                                            +  nocreat   do not create the output file 
-     20 root       0 -20            0      0 I   0.0   0.0   0:00.00 kworker/1:0H                                                                                                                                                            +  notrunc   do not truncate the output file 
-     21 root      20              0      0 S   0.0   0.0   0:00.00 cpuhp/                                                                                                                                                                +  noerror   continue after read errors 
-     22 root      rt              0      0 S   0.0   0.0   0:00.00 watchdog/                                                                                                                                                             +  fdatasync  physically write output file data before finishing 
-     23 root      rt              0      0 S   0.0   0.0   0:00.00 migration/                                                                                                                                                            +  fsync     likewise, but also write metadata 
-     24 root      20              0      0 S   0.0   0.0   0:00.00 ksoftirqd/                                                                                                                                                            + 
-     26 root       0 -20            0      0   0.0   0.0   0:00.00 kworker/2:0H-kblockd                                                                                                                                                    +Each FLAG symbol may be
-     27 root      20              0      0 S   0.0   0.0   0:00.00 cpuhp/                                                                                                                                                                + 
-     28 root      rt              0      0 S   0.0   0.0   0:00.00 watchdog/3                                                                                                                                                              +  append    append mode (makes sense only for output; conv=notrunc suggested) 
-     29 root      rt              0      0 S   0.0   0.0   0:00.00 migration/                                                                                                                                                            +  direct    use direct I/O for data 
-     30 root      20              0      0 S   0.0   0.0   0:00.00 ksoftirqd/                                                                                                                                                            +  directory  fail unless a directory 
-     32 root       -20            0      0   0.0   0.0   0:00.00 kworker/3:0H-kblockd                                                                                                                                                    +  dsync     use synchronized I/O for data 
-     35 root      20   0            0      0 S   0.0   0.0   0:00.00 kdevtmpfs                                                                                                                                                               +  sync      likewise, but also for metadata 
-     36 root       0 -20            0      0 I   0.0   0.0   0:00.00 netns                                                                                                                                                                   +  fullblock  accumulate full blocks of input (iflag only) 
-     37 root      20              0      0 S   0.0   0.0   0:00.00 kauditd                                                                                                                                                                 +  nonblock  use non-blocking I/O 
-     38 root      20              0      0 S   0.0   0.0   0:00.00 khungtaskd                                                                                                                                                              +  noatime   do not update access time 
-     39 root      20              0      0 S   0.0   0.0   0:00.00 oom_reaper                                                                                                                                                              +  nocache   Request to drop cache See also oflag=sync 
-     40 root       0 -20            0      0 I   0.0   0.0   0:00.00 writeback                                                                                                                                                               +  noctty    do not assign controlling terminal from file 
-     41 root      20              0      0 S   0.0   0.0   0:00.00 kcompactd0                                                                                                                                                              +  nofollow  do not follow symlinks 
-     42 root      25              0      0 S   0.0   0.0   0:00.00 ksmd                                                                                                                                                                    +  count_bytes  treat 'count=N' as a byte count (iflag only) 
-     43 root      39  19            0      0 S   0.0   0.0   0:00.00 khugepaged                                                                                                                                                              +  skip_bytes  treat 'skip=N' as a byte count (iflag only) 
-     44 root       0 -20            0      0   0.0   0.0   0:00.00 crypto                                                                                                                                                                  +  seek_bytes  treat 'seek=N' as a byte count (oflag only) 
-     45 root       0 -20            0      0 I   0.0   0.0   0:00.00 kintegrityd                                                                                                                                                             + 
-     46 root       0 -20            0      0 I   0.0   0.0   0:00.00 kblockd                                                                                                                                                                 +Sending a USR1 signal to a running 'dd' process makes it 
-     47 root       -20            0      0 I   0.0   0.0   0:00.00 blkcg_punt_bio                                                                                                                                                          +print I/O statistics to standard error and then resume copying
-     48 root       -20            0      0 I   0.0   0.0   0:00.00 tpm_dev_wq                                                                                                                                                              + 
-     49 root       0 -20            0      0 I   0.0   0.0   0:00.00 md                                                                                                                                                                      +Options are
-     50 root       -20            0      0 I   0.0   0.0   0:00.00 edac-poller                                                                                                                                                             + 
-     51 root      rt              0      0 S   0.0   0.0   0:00.00 watchdogd                                                                                                                                                               +      --help     display this help and exit 
-     53 root       0 -20            0      0 I   0.0   0.0   0:00.00 pm_wq                                                                                                                                                                   +      --version  output version information and exit 
-     69 root      20              0      0 S   0.0   0.0   0:00.00 kswapd0                                                                                                                                                                 + 
-    162 root       0 -20            0      0 I   0.0   0.0   0:00.00 kthrotld                                                                                                                                                                +GNU coreutils online help<https://www.gnu.org/software/coreutils/> 
-    163 root       0 -20            0      0 I   0.0   0.0   0:00.00 acpi_thermal_pm                                      +Full documentation <https://www.gnu.org/software/coreutils/dd> 
-...                                                                         +or available locally viainfo '(coreutils) dd invocation'
 </code> </code>
  
-Pour afficher l'aide de la commande **top**, appuyez sur la touche **h** :+===LAB #3 - Travailler avec la Commande dd===
  
-<code> +Vous allez utiliser maintenant le logiciel **dd** pour effectuer une sauvegarde de votre MBR et de la table des partitions.
-Help for Interactive Commands - procps-ng 3.3.15 +
-Window 1:Def: Cumulative mode Off.  System: Delay 3.0 secs; Secure mode Off.+
  
-  Z,B,E,  Global: 'Z' colors; 'B' bold; 'E'/'e' summary/task memory scale +Effectuez une sauvegarde de votre MBR qui se trouve dans les premiers 446 octets de votre disque **/dev/sda** :
-  l,t,m     Toggle Summary'l' load avg; 't' task/cpu stats; 'm' memory info +
-  0,1,2,3,I Toggle: '0' zeros; '1/2/3' cpus or numa node views; 'I' Irix mode +
-  f,F,X     Fields: 'f'/'F' add/remove/order/sort; 'X' increase fixed-width+
  
-  L,&,<,. Locate: 'L'/'&' find/again; Move sort column: '<'/'>' left/right +<code> 
-  R,H,V,Toggle: 'R' Sort; 'H' Threads; 'V' Forest view; 'J' Num justify +[root@redhat9 /]# dd if=/dev/sda of=/tmp/mbr.save bs=1 count=446 
-  c,i,S,j . Toggle: 'c' Cmd name/line; 'i' Idle; 'S' Time; 'j' Str justify +446+0 records in 
-  x,    . Toggle highlights: 'x' sort field; 'y' running tasks +446+0 records out 
-  z,b     Toggle: 'z' color/mono; 'b' bold/reverse (only if 'x' or 'y'+446 bytes copied0.00114645 s389 kB/s 
-  u,U,o,O . Filter by: 'u'/'U' effective/any user; 'o'/'O' other criteria +</code>
-  n,#,^O  . Set: 'n'/'#' max tasks displayed; Show: Ctrl+'O' other filter(s) +
-  C,...   . Toggle scroll coordinates msg for: up,down,left,right,home,end+
  
-  k,r       Manipulate tasks'k' kill; 'r' renice +Effectuez maintenant une sauvegarde de votre table des partitions qui se trouve dans les 64 octets après les 446 précédemment sauvegardés 
-  d or s    Set update interval + 
-  W,      Write configuration file 'W'; Inspect other output 'Y' +<code> 
-          Quit +[root@redhat9 /]# dd if=/dev/sda of=/tmp/tblpart.save bs=1 count=64 skip=446 
-          ( commands shown with '.' require a visible task display window )  +64+0 records in 
-Press 'h' or '?' for help with Windows, +64+0 records out 
-Type 'q' or <Esc> to continue +64 bytes copied, 0.000282251 s, 227 kB/s
 </code> </code>
  
-<WRAP center round important> +<WRAP center round important 60%
-**Important** - Pour revenir à l'affichage précédent, appuyez sur la touche **q** ou **echap**.+**Important** - Notez l'utilisation de l'option **skip** qui permet de positionner le début de la sauvegarde au 447ième octet.
 </WRAP> </WRAP>
  
-Au lancement, le temps de rafraîchissement de la liste est de 3 secondes. Pour modifier ce temps à 1 secondeappuyez sur la touche **s** puis la touche 1 et validez :+====Les Commandes dump et restore==== 
 + 
 +===Présentation=== 
 + 
 +Les commandes **dump** et **restore** se basent sur le format d'enregistrement des données ( ext3 ). Pour cette raison il n'est pas possible de sauvegarder des répertoires à l'intérieur d'un système de fichiers mais uniquement des systèmes de fichiers complets. 
 + 
 +Il est important de noter que le système de fichier ne doit pas être utilisé pendant le processus de dump. Pour cette raison il est normalement conseillé de démonter le système de fichiers.  
 + 
 +Il existe 10 niveaux de dump possibles de **0** à **9**. Lors d'un dump le niveau est spécifié. Chaque fois qu'un dump est effectué, cette information est sauvegardée dans le fichier /etc/dumpdates.  
 + 
 +Par définition un dump de niveau **0** est une sauvegarde complète tandis que le dump de niveau est une sauvegarde incrémentale. 
 + 
 +Notez que les fichiers sont sauvegardés avec des nom relatifs. Ceci implique que vous devez vous positionner dans le système de fichiers lors de la restauration avec la commande **restore**. 
 + 
 +=====Outils Avancés de Sauvegarde ===== 
 + 
 +====Outils de Sauvegarde Unidirectionnelle==== 
 + 
 +Ces outils sauvegardent des fichiers vers un répertoire local ou distant dans un seul sens.  
 + 
 +Ce premier tableau compare les outils par rapport aux caractéristiques et aux capacités des opérations de sauvegarde : 
 + 
 +^  Outil  ^  Backend  ^  Sauvegarde différentielle  ^  Sauvegarde incrémentale  ^  Sauvegarde décrémentale  ^  Planification incorporée  ^  Restauration incorporée  ^  Chiffrement  ^  Compression  ^  Site  ^ 
 +| **[[https://en.wikipedia.org/wiki/Advanced_Maryland_Automatic_Network_Disk_Archiver|AMANDA]]** |  targzip  | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[http://www.amanda.org/|AMANDA]]**| 
 +| **[[https://en.wikipedia.org/wiki/Areca_Backup|Areca Backup]]** |  Aucun   | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[http://www.areca-backup.org/|Areca Backup]]** | 
 +| **[[https://en.wikipedia.org/wiki/Bacula|bacula (Bareos)]]** |  MySQL  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://www.bacula.org/|bacula]]** | 
 +| **[[https://en.wikipedia.org/wiki/Back_in_Time_(Linux_software)|BackInTime]]** |  rsync, diff, meld  | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | **[[https://github.com/bit-team/backintime| BackInTime]]** | 
 +| **[[https://en.wikipedia.org/wiki/BackupPC|BackupPC]]** |  rsync, samba, tar  | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://backuppc.github.io/backuppc/|BackupPC]]** | 
 +| **[[https://en.wikipedia.org/wiki/Dar_(disk_archiver)|Dar]]** |  Aucun  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[http://dar.linux.free.fr/|Dar]]** | 
 +| **[[https://en.wikipedia.org/wiki/Duplicity_(software)|Déjà Dup]]** |  duplicity  | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | **[[http://duplicity.nongnu.org/| Duplicity]]** |  
 +| **[[https://en.wikipedia.org/wiki/Grsync|Grsync]]** |  rsync  | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | **[[http://www.opbyte.it/grsync/|Grsync]]** | 
 +| **[[https://en.wikipedia.org/wiki/LuckyBackup|luckyBackup]]** |  rsync  | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} |  {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | **[[https://sourceforge.net/projects/luckybackup/|luckyBackup]]** | 
 +| **[[https://launchpad.net/sbackup|SBackup]]** |  Aucun  | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://sourceforge.net/projects/sbackup/|SBackup]]** |  
 + 
 +<WRAP center round todo 60%> 
 +**A Faire** - Consultez la page **[[https://en.wikipedia.org/wiki/List_of_backup_software|List of backup software]]** sur Wikipedia pour plus d'informations. 
 +</WRAP> 
 + 
 +Ce deuxième tableau compare les outils triés par la date de dernière version connue : 
 + 
 +^  Outil  ^  Ecrit en  ^  Licence  ^  Dernière Version  ^  Date Version  ^  Linux  ^  Windows  ^  Mac  ^  Site Web  ^ 
 +**Dar** |  C++  |  GPL  |  2.6.2  |  09/02/2019  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[http://dar.linux.free.fr/|Dar]]** | 
 +| **Bacula (Bareos)** |  C, C++  |  GNU Affero General Public License v3.0  |  9.4.2  |  04/02/2019  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://www.bacula.org/|bacula]]** | 
 +| **BackupPC** |  Perl  |  GPL v3.0  |  4.3.0  |  25/11/2018  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://backuppc.github.io/backuppc/|BackupPC]]** | 
 +| **luckyBackup** |  C++  |  GPL v3.0  |  0.5.0  |  18/11/2018  |  {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://sourceforge.net/projects/luckybackup/|luckyBackup]]** | 
 +| **Déjà Dup (Duplicity)** |  Python  |  GPL  |  0.7.18.2  | 17/11/2018 | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[http://duplicity.nongnu.org/| Duplicity]]** |  
 +| **AMANDA** |  C, Perl  |  GPL, LGPL, Apache, Amanda License  |  3.5.1  |  01/12/2017  |  {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}}  |  {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}}  |  {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}}  | **[[http://www.amanda.org/|AMANDA]]**| 
 +| **BackInTime** |  Python3  |  GPL  |  1.1.24  |  07/11/2017  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | **[[https://github.com/bit-team/backintime| BackInTime]]** | 
 +| **Grsync** |  GTK  |  GPL  |  1.2.6  |  15/03/2016  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[http://www.opbyte.it/grsync/|Grsync]]** | 
 +| **Areca Backup** |  Java  |  GPLv2    7.5  |  26/08/2015  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[http://www.areca-backup.org/|Areca Backup]]** | 
 +| **SBackup** |  GTK  |  GPLv2  |  0.11.6  |  24/02/2014  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | **[[https://sourceforge.net/projects/sbackup/|SBackup]]** |  
 + 
 +====Outils de Sauvegarde Multidirectionnelle==== 
 + 
 +Ces outils synchronisent les fichiers entre deux serveurs. 
 + 
 +Ce premier tableau compare les outils par rapport aux caractéristiques et aux capacités des opérations de sauvegarde : 
 + 
 +^  Outil  ^  Backend  ^  Sauvegarde différentielle  ^  Sauvegarde incrémentale  ^  Sauvegarde décrémentale  ^  Planification incorporée  ^  Restauration incorporée  ^  Chiffrement  ^  Compression 
 +| **[[https://fr.wikipedia.org/wiki/FullSync|FullSync]]** | smb, ftp, sftp | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} |  S/O  | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | 
 +| **[[https://en.wikipedia.org/wiki/FreeFileSync|FreeFileSync]]** | Aucun | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} |  S/O  | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | 
 +| **[[https://fr.wikipedia.org/wiki/Unison_(logiciel)|unison]]** | SSH, RSH | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} |  S/O  | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | 
 +| **[[https://en.wikipedia.org/wiki/Synkron|Synkron]]** | Aucun | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | 
 + 
 +<WRAP center round todo 60%> 
 +**A Faire** - Consultez la page **[[https://en.wikipedia.org/wiki/Comparison_of_file_synchronization_software|Comparison of file synchronization software]]** sur Wikipedia pour plus d'informations.. 
 +</WRAP> 
 + 
 +Ce deuxième tableau compare les outils triés par la date de dernière version connue : 
 + 
 +^  Outil  ^  Ecrit en  ^  Licence  ^  Dernière Version  ^  Date Version  ^  Linux  ^  Windows  ^  Mac  ^  Site Web  ^ 
 +| **FreeFileSync** |  Divers  |  GPL v3.0    10.8  |  05/01/2019  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://freefilesync.org/|FreeFileSync]]** | 
 +| **unison** |  OCaml  |  GPL v3.0  |  2.51.2  |  27/01/2018  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://www.cis.upenn.edu/~bcpierce/unison/|unison]]** | 
 +| **FullSync** |  Java  |  GPLv2  |  0.10.4  |  05/04/2016  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | **[[https://fullsync.sourceforge.io/|FullSync]]** | 
 +| **Synkron** |  C++  |  GPL v2  |  1.6.2  |  25/01/2011  |  {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[http://synkron.sourceforge.net/|Synkron]]** | 
 + 
 +====Outils de Sauvegarde des Partitions==== 
 + 
 +Ce premier tableau compare les outils par rapport aux caractéristiques et aux capacités des opérations de sauvegarde : 
 + 
 +^  Outil  ^  Backend  ^  Sauvegarde différentielle  ^  Sauvegarde incrémentale  ^  Sauvegarde décrémentale  ^  Planification incorporée  ^  Restauration incorporée  ^  Chiffrement  ^  Compression  ^  
 +| **[[https://en.wikipedia.org/wiki/Clonezilla|CloneZilla]]** | SSH, samba, NFS | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | 
 +| **[[https://en.wikipedia.org/wiki/Partclone|Partclone]]** | Aucun | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | 
 +| **[[https://en.wikipedia.org/wiki/Partimage|partimage]]** | Aucun | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | 
 + 
 +<WRAP center round todo 60%> 
 +**A Faire** - Consultez la page **[[https://en.wikipedia.org/wiki/Comparison_of_disk_cloning_software|Comparison of disk cloning software]]** sur Wikipedia pour plus d'informations. 
 +</WRAP> 
 + 
 +Ce deuxième tableau compare les outils triés par la date de dernière version connue : 
 + 
 +^  Outil  ^  Ecrit en  ^  Licence  ^  Dernière Version  ^  Date Version  ^  Linux  ^  Windows  ^  Mac  ^  Site Web  ^ 
 +| **CloneZilla** |  Perl, Unix shell  |  GPL  |  2.6.0-37  |  10/01/2019  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://clonezilla.org/|CloneZilla]]** | 
 +| **Partclone** |  C  |  GPL  |  0.2.89  |  05/07/2016  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | **[[https://partclone.org/|Partclone]]** | 
 +| **[[https://en.wikipedia.org/wiki/Partimage|partimage]]** |  C  |  GPL  |  0.6.9    25/07/2010  | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:accept.png?nolink |}} | {{ :elearning:workbooks:debian:6:senior:cancel.png?nolink |}} | **[[http://www.partimage.org/|Partimage]]** | 
 + 
 +====LAB #4 - Que Sauvegarder en Priorité ?==== 
 + 
 +===Sauvegarde de la Liste des Paquets=== 
 + 
 +Supprimez les fichiers de verrouillage de la base de données RPM :
  
 <code> <code>
-[root@centos8 ~]# top +root@redhat9 /]# rm -f /var/lib/rpm/__db*
-... +
-top 09:11:24 up 10 min,  1 user,  load average: 0.01, 0.07, 0.07 +
-Tasks: 144 total,   1 running, 143 sleeping,   0 stopped,   0 zombie +
-%Cpu(s):  0.0 us,  0.1 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.2 hi,  0.0 si,  0.0 st +
-MiB Mem :   3737.7 total,   3248.8 free,    231.7 used,    257.2 buff/cache +
-MiB Swap:   2000.0 total,   2000.0 free,      0.0 used.   3279.7 avail Mem  +
-Change delay from 3.0 to 1 +
-...+
 </code> </code>
  
-Pour trier la liste selon l'utilisation de la mémoire, appuyez sur la touche **M** :+Sauvegardez les bases de données RPM :
  
 <code> <code>
-[root@centos8 ~]# top +[root@redhat9 /]# tar czvf $(hostname).rpmdatabase.tar.gz /var/lib/rpm 
-... +tarRemoving leading `/' from member names 
-top - 09:12:07 up 10 min,  1 user,  load average0.00, 0.05, 0.06 +/var/lib/rpm/ 
-Tasks: 146 total,   1 running, 145 sleeping,   0 stopped,   0 zombie +/var/lib/rpm/rpmdb.sqlite 
-%Cpu(s):  0.1 us,  0.4 sy,  0.7 ni, 97.6 id,  0.2 wa,  0.9 hi,  0.1 si,  0.0 st +/var/lib/rpm/rpmdb.sqlite-wal 
-MiB Mem :   3737.7 total,   3192.8 free,    233.5 used,    311.4 buff/cache +/var/lib/rpm/rpmdb.sqlite-shm 
-MiB Swap:   2000.0 total,   2000.0 free,      0.0 used.   3277.3 avail Mem +/var/lib/rpm/.rpm.lock 
 +</code>
  
-    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                                 +Pour sauvegarder la liste des paquets à l'identique en termes de version, utilisez la commande RPM 
-    874 root      20    290088  40696  17960 S   0.0   1.1   0:00.54 firewalld                                                                                                                                                               + 
-    875 root      20    224868  40472  38904 S   0.0   1.1   0:00.08 sssd_nss                                                                                                                                                                +<code> 
-    902 root      20    426324  33684  16668 S   0.0   0.9   0:00.25 tuned                                                                                                                                                                   +[root@redhat9 /]# rpm -qa > liste-des-paquets_`hostname`_`date +%Y-%m-%d-%H-%M`
-    827 polkitd   20   0 1764748  25376  17348 S   0.0   0.7   0:00.12 polkitd                                                                                                                                                                 +
-    884 root      20    391768  18828  16220 S   0.1   0.5   0:00.11 NetworkManager                                                                                                                                                          +
-    866 root      20    221424  15016  12284 S   0.0   0.4   0:00.09 sssd_be                                                                                                                                                                 +
-    840 root      20    214800  14292  12260 S   0.0   0.4   0:00.03 sssd                                                                                                                                                                    +
-      1 root      20    245540  14260   9308 S   0.1   0.4   0:01.66 systemd                                                                                                                                                                 +
-   1627 root      20    195868  11896  10336 S   0.0   0.3   0:00.02 su                                                                                                                                                                      +
-    666 root      20    110416  11336   8292 S   0.0   0.3   0:00.30 systemd-udevd                                                                                                                                                           +
-   1585 root      20    163700  10636   9340 S   0.0   0.3   0:00.01 sshd                                                                                                                                                                    +
-   1590 trainee   20     94128   9872   8240 S   0.0   0.3   0:00.05 systemd                                                                                                                                                                 +
-    880 root      20     96712   9780   7568 S   0.0   0.3   0:00.25 systemd-logind                                                                                                                                                          +
-    632 root      20     94036   9064   8016 S   0.0   0.2   0:00.28 systemd-journal                                                                                                                                                         +
-    837 root      20     83656   7004   6108 S   0.0   0.2   0:00.19 systemd-machine                                                                                                                                                         +
-    905 root      20     92288   6996   6100 S   0.0   0.2   0:00.01 sshd                                                                                                                                                                    +
-    847 rngd      20    381308   6500   5656 S   0.0   0.2   0:15.38 rngd                                                                                                                                                                    +
-    828 root      20     50640   5900   4600 S   0.0   0.2   0:00.03 smartd                                                                                                                                                                  +
-   1600 trainee   20    163700   5584   4284 S   0.0   0.1   0:00.04 sshd                                                                                                                                                                    +
-   1601 trainee   20     28312   5564   3664 S   0.0   0.1   0:00.02 bash                                                                                                                                                                    +
-    834 dbus      20     64684   5476   4480 S   0.1   0.1   0:00.22 dbus-daemon                                                                                                                                                             +
-   1634 root      20     27644   5428   3408 S   0.0   0.1   0:00.06 bash                                                                                                                                                                    +
-    791 rpc       20     67140   5396   4672 S   0.0   0.1   0:00.01 rpcbind                                                                                                                                                                 +
-   1594 trainee   20    175840   5228     40 S   0.0   0.1   0:00.00 (sd-pam)                                                                                                                                                                +
-   1113 root      20    209436   5036   3516 S   0.0   0.1   0:00.09 rsyslogd                                                                                                                                                                +
-    823 root      20    124908   4644   4080 S   0.0   0.1   0:00.03 irqbalance                                                                                                                                                              +
-   1803 root      20     65420   4508   3808 R   0.0   0.1   0:00.03 top         +
-...                                                        +
 </code> </code>
  
-Pour ne pas visualiser les processus zombies ou les processus en attente, appuyez sur la touche i :+Consultez le contenu de ce fichier :
  
 <code> <code>
-[root@centos8 ~]# top +[root@redhat9 /]# more liste-des-paquets_redhat9.ittraining.loc_2024-09-27-08-15  
-... +fonts-filesystem-2.0.5-7.el9.1.noarch 
-top 09:13:01 up 11 min,  1 user,  load average: 0.00, 0.04, 0.06 +xkeyboard-config-2.33-2.el9.noarch 
-Tasks: 145 total,   running, 143 sleeping,   stopped,   zombie +abattis-cantarell-fonts-0.301-4.el9.noarch 
-%Cpu(s):  0.1 us,  0.1 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.1 hi,  0.0 si,  0.0 st +yelp-xsl-40.2-1.el9.noarch 
-MiB Mem :   3737.7 total,   3192.5 free,    233.8 used,    311.4 buff/cache +mozilla-filesystem-1.9-30.el9.x86_64 
-MiB Swap:   2000.0 total,   2000.0 free,      0.0 used  3276.9 avail Mem +google-noto-fonts-common-20201206-4.el9.noarch 
 +foomatic-db-filesystem-4.0-72.20210209.el9.noarch 
 +adobe-mappings-cmap-20171205-12.el9.noarch 
 +subscription-manager-rhsm-certificates-20220623-1.el9.noarch 
 +libreport-filesystem-2.15.2-6.el9.noarch 
 +adobe-mappings-cmap-deprecated-20171205-12.el9.noarch 
 +adobe-source-code-pro-fonts-2.030.1.050-12.el9.1.noarch 
 +dejavu-sans-mono-fonts-2.37-18.el9.noarch 
 +dejavu-sans-fonts-2.37-18.el9.noarch 
 +langpacks-core-font-en-3.0-16.el9.noarch 
 +google-droid-sans-fonts-20200215-11.el9.2.noarch 
 +thai-scalable-fonts-common-0.7.2-5.el9.noarch 
 +redhat-indexhtml-9-4.el9_2.noarch 
 +poppler-data-0.4.9-9.el9.noarch 
 +mobile-broadband-provider-info-20210805-2.el9.noarch 
 +man-pages-overrides-9.0.0.0-1.el9.noarch 
 +hunspell-filesystem-1.7.0-11.el9.x86_64 
 +hplip-common-3.21.2-6.el9.x86_64 
 +gawk-all-langpacks-5.1.0-6.el9.x86_64 
 +adwaita-cursor-theme-40.1.1-3.el9.noarch 
 +adobe-mappings-pdf-20180407-10.el9.noarch 
 +vim-filesystem-8.2.2637-20.el9_1.noarch 
 +rhsm-icons-6-1.el9.noarch 
 +filesystem-3.16-2.el9.x86_64 
 +urw-base35-fonts-common-20200910-6.el9.noarch 
 +basesystem-11-13.el9.noarch 
 +quota-nls-4.06-6.el9.noarch 
 +publicsuffix-list-dafsa-20210518-3.el9.noarch 
 +pkgconf-m4-1.7.3-10.el9.noarch 
 +popt-1.18-8.el9.x86_64 
 +xz-libs-5.2.5-8.el9_0.x86_64 
 +libxcrypt-4.4.18-3.el9.x86_64 
 +bzip2-libs-1.0.8-8.el9.x86_64 
 +libzstd-1.5.1-2.el9.x86_64 
 +libpng-1.6.37-12.el9.x86_64 
 +libcap-ng-0.8.2-7.el9.x86_64 
 +libicu-67.1-9.el9.x86_64 
 +libunistring-0.9.10-15.el9.x86_64 
 +libgpg-error-1.42-5.el9.x86_64 
 +libseccomp-2.5.2-2.el9.x86_64 
 +lcms2-2.12-3.el9.x86_64 
 +readline-8.1-4.el9.x86_64 
 +libwayland-client-1.21.0-1.el9.x86_64 
 +libwayland-server-1.21.0-1.el9.x86_64 
 +jansson-2.14-1.el9.x86_64 
 +libxkbcommon-1.0.3-4.el9.x86_64 
 +libwayland-egl-1.21.0-1.el9.x86_64 
 +keyutils-libs-1.6.3-1.el9.x86_64 
 +libdhash-0.5.0-53.el9.x86_64 
 +libXau-1.0.9-8.el9.x86_64 
 +--More--(4%) 
 +[q] 
 +</code>
  
-    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                                 +<WRAP center round important 60%> 
-    827 polkitd   20   0 1764748  25376  17348 S   0.1   0.7   0:00.13 polkitd                                                                                                                                                                 +**Important** - Il convient ensuite de sauvegarder les deux fichiers **liste-des-paquets_*** et **$(hostname).rpmdatabase.tar.gz** sur un support externe
-      1 root      20    245540  14260   9308 S   0.1   0.4   0:01.67 systemd                                                                                                                                                                 +</WRAP> 
-    823 root      20    124908   4644   4080 S   0.1   0.1   0:00.04 irqbalance                                                                                                                                                              + 
-   1803 root      20     65420   4508   3808 R   0.2   0.1   0:00.08 top        +Afin de restaurer les sauvegardes, récupérez les deux fichiers  **liste-des-paquets_*** et **$(hostname).rpmdatabase.tar.gz** du support externe à la racine du système de fichiers 
 + 
 +<code> 
 +[root@redhat9 ~]# cp liste-des-paquets_redhat9.ittraining.loc_2024-09-27-08-15 redhat9.ittraining.loc.rpmdatabase.tar.gz /
 </code> </code>
  
-Pour quitter top, appuyez sur la touche **q**.+Placez-vous à la racine du système de fichiers et restaurez les bases de données RPM :
  
-Les options de cette commande sont :+<code> 
 +[root@redhat9 /]# tar xvf redhat9.ittraining.loc.rpmdatabase.tar.gz  
 +var/lib/rpm/ 
 +var/lib/rpm/rpmdb.sqlite 
 +var/lib/rpm/rpmdb.sqlite-wal 
 +var/lib/rpm/rpmdb.sqlite-shm 
 +var/lib/rpm/.rpm.lock 
 +</code> 
 + 
 +Utilisez YUM pour restaurer les paquets :
  
 <code> <code>
-[root@centos8 ~]# top --help +[root@redhat9 /]# dnf -y install -y $(cat liste-des-paquets_redhat9.ittraining.loc_2024-09-27-08-15)
-top: inappropriate '-help' +
-Usage: +
-  top -hv | -bcEHiOSs1 -d secs -n max -u|U user -p pid(s-o field -w [cols]+
 </code> </code>
  
-====1.5 - Les Commandes fg, bg et jobs====+===Sauvegarde d'un Mémo sur la Structure du Disque Dur Système===
  
-Normalement les commandes s’exécutent en avant planVous pouvez également lancer des processus en arrière plan (en tâche de fond)Si vous lancez une commande en tâche de fondil faut rajouter **(espace)&** à la fin de la commande :+<code> 
 +[root@redhat9 /]# cd ~ 
 +[root@redhat9 ~]# fdisk -l /dev/sda > structure.list 
 +[root@redhat9 ~]# cat structure.list  
 +Disk /dev/sda: 50 GiB53687091200 bytes, 104857600 sectors 
 +Disk model: QEMU HARDDISK    
 +Units: sectors of 1 512 = 512 bytes 
 +Sector size (logical/physical): 512 bytes / 512 bytes 
 +I/O size (minimum/optimal): 512 bytes / 512 bytes 
 +Disklabel type: dos 
 +Disk identifier: 0xd00dfc8a
  
-<file> +Device     Boot   Start       End   Sectors Size Id Type 
-# sleep 9999 & +/dev/sda1  *       2048   2099199   2097152   1G 83 Linux 
-</file>+/dev/sda2       2099200 104857599 102758400  49G 8e Linux LVM 
 +</code>
  
-<WRAP center round important> +<WRAP center round important 60%
-Notez qu’un processus en arrière plan est dit **asynchrone** car il se poursuit indépendamment de son parent qui est le shell. En avant plan le processus est dit **synchrone**.+**Important** - Il convient ensuite de sauvegarder le fichier **structure.list** sur un support externe.
 </WRAP> </WRAP>
  
-Linux numérote tous les processus qui sont placés en tâches de fond. On parle donc dun **numéro de tâche**.+===Sauvegarde d'un Mémo sur les Points de Montage du Disque Dur Système===
  
-La commande **jobs** permet de se renseigner sur les processus en arrière plan :+Saisissez la commande suivante :
  
 <code> <code>
-[root@centos8 ~]# sleep 9999 & +[root@redhat9 ~]# df -h | grep "^/dev/" > montages.list 
-[1] 1865 +[root@redhat9 ~]# cat montages.list 
-[root@centos8 ~]# jobs -l +/dev/mapper/rhel-root   44G  7.8G   37G  18% / 
-[1]+  1865 Running                 sleep 9999 &+/dev/sda1             1014M  398M  617M  40% /boot
 </code> </code>
  
-<WRAP center round important> +<WRAP center round important 60%
-**Important** - Notez que le numéro de tâche est indiqué entre [crochets] tandis que le PID ne l'est pas. Le signe **+** qui suit le numéro de tâche [1] indique que la tâche est la dernière a avoir été manipulée.+**Important** - Il convient ensuite de sauvegarder le fichier **montages.list** sur un support externe.
 </WRAP> </WRAP>
  
-Si on souhaite envoyer un processus en arrière plan de façon à libérer le shell pour d’autres commandes, il faut d’abord suspendre le processus en question. Normalement on suspend un processus en utilisant la combinaison de touches <key>Ctrl</key><key>Z</key>.+===Sauvegarde du Chargeur de Démarrage===
  
-Par exemple :+==GRUB Legacy== 
 + 
 +  # cp /boot/grub/menu.lst grubmenu.lst 
 + 
 +==GRUB 2 avec BIOS== 
 + 
 +Saisissez les commandes suivantes :
  
 <code> <code>
-[root@centos8 ~]# sleep 1234 +[root@redhat9 ~]# cp /boot/grub2/grub.cfg grub.cfg 
-^Z +[root@redhat9 ~]# cp /boot/grub2/device.map device.map
-[2]+  Stopped                 sleep 1234+
 </code> </code>
  
-Un fois suspendu, on utilise la commande **bg** (background) suivi par **%** et le numéro de tâche pour envoyer le processus en arrière plan :+==GRUB 2 avec EFI==
  
 <code> <code>
-[root@centos8 ~]bg %2 +cp /boot/efi/EFI/redhat/grub.cfg grub.cfg 
-[2]+ sleep 1234 & +cp /boot/grub2/device.map device.map
-[root@centos8 ~]jobs -l +
-[1]-  1865 Running                 sleep 9999 & +
-[2]+  1874 Running                 sleep 1234 &+
 </code> </code>
  
-<WRAP center round important> +<WRAP center round important 60%
-**Important** - Notez que lors du passage en arrière plan, le processus reprend son exécution normalementLe caractère **-** qui suit le numéro de tâche [1] indique que la tâche est l'avant-dernière a avoir été manipulée.+**Important** - Il convient ensuite de sauvegarder le fichier **menu.lst** ou **grub.cfg** et le fichier **device.map** sur un support externe.
 </WRAP> </WRAP>
  
-Pour ramener le processus en avant plan, il faut de nouveau interrompre le processus concerné. Or cette fois-ci, nous ne pouvons pas utiliser la commande <key>Ctrl</key><key>Z</key>. Il faut donc envoyer un **signal** au processus en utilisant la commande **kill** avec l’opérateur **–stop**.+===Sauvegarde des Dossiers Utilisateurs===
  
 <code> <code>
-[root@centos8 ~]# kill -stop %2 +[root@redhat9 ~]# cp -apv /home/ . 
-[root@centos8 ~]# jobs -l +'/home/' -> './home' 
-[1] 1865 Running                 sleep 9999 & +'/home/trainee' -> './home/trainee' 
-[2]+  1874 Stopped (signal)        sleep 1234+'/home/trainee/training' -> './home/trainee/training' 
 +'/home/trainee/training/f1' -> './home/trainee/training/f1' 
 +'/home/trainee/training/f2' -> './home/trainee/training/f2' 
 +'/home/trainee/training/f3' -> './home/trainee/training/f3' 
 +'/home/trainee/training/f4' -> './home/trainee/training/f4' 
 +'/home/trainee/training/f5' -> './home/trainee/training/f5' 
 +'/home/trainee/training/f52' -> './home/trainee/training/f52' 
 +'/home/trainee/training/f62' -> './home/trainee/training/f62' 
 +'/home/trainee/training/a100' -> './home/trainee/training/a100' 
 +'/home/trainee/training/f' -> './home/trainee/training/f' 
 +'/home/trainee/training/f.txt' -> './home/trainee/training/f.txt' 
 +'/home/trainee/training/f123.txt' -> './home/trainee/training/f123.txt' 
 +'/home/trainee/training/f123123.txt' -> './home/trainee/training/f123123.txt' 
 +'/home/trainee/training/f123123123.txt' -> './home/trainee/training/f123123123.txt' 
 +'/home/trainee/training/file' -> './home/trainee/training/file' 
 +'/home/trainee/training/user_check' -> './home/trainee/training/user_check' 
 +'/home/trainee/bin' -> './home/trainee/bin' 
 +'/home/trainee/bin/myscript' -> './home/trainee/bin/myscript' 
 +'/home/trainee/Desktop' -> './home/trainee/Desktop' 
 +'/home/trainee/Documents' -> './home/trainee/Documents' 
 +'/home/trainee/.config' -> './home/trainee/.config' 
 +'/home/trainee/.config/ibus' -> './home/trainee/.config/ibus' 
 +'/home/trainee/.config/ibus/bus' -> './home/trainee/.config/ibus/bus' 
 +'/home/trainee/.config/ibus/bus/5a35a3eb625c45cea1d33535723e791f-unix-wayland-0' -> './home/trainee/.config/ibus/bus/5a35a3eb625c45cea1d33535723e791f-unix-wayland-0' 
 +'/home/trainee/.config/user-dirs.dirs' -> './home/trainee/.config/user-dirs.dirs' 
 +'/home/trainee/.config/user-dirs.locale' -> './home/trainee/.config/user-dirs.locale' 
 +'/home/trainee/.config/evolution' -> './home/trainee/.config/evolution' 
 +'/home/trainee/.config/evolution/sources' -> './home/trainee/.config/evolution/sources' 
 +'/home/trainee/.config/evolution/sources/system-proxy.source' -> './home/trainee/.config/evolution/sources/system-proxy.source' 
 +'/home/trainee/.config/gtk-3.0' -> './home/trainee/.config/gtk-3.0' 
 +'/home/trainee/.config/gtk-3.0/bookmarks' -> './home/trainee/.config/gtk-3.0/bookmarks' 
 +'/home/trainee/.config/.gsd-keyboard.settings-ported' -> './home/trainee/.config/.gsd-keyboard.settings-ported' 
 +'/home/trainee/.config/gnome-initial-setup-done' -> './home/trainee/.config/gnome-initial-setup-done' 
 +'/home/trainee/.config/goa-1.0' -> './home/trainee/.config/goa-1.0' 
 +'/home/trainee/.config/pulse' -> './home/trainee/.config/pulse' 
 +'/home/trainee/.config/pulse/cookie' -> './home/trainee/.config/pulse/cookie' 
 +'/home/trainee/.config/dconf' -> './home/trainee/.config/dconf' 
 +'/home/trainee/.config/dconf/user' -> './home/trainee/.config/dconf/user' 
 +'/home/trainee/codes' -> './home/trainee/codes' 
 +'/home/trainee/codes/exit.txt' -> './home/trainee/codes/exit.txt' 
 +'/home/trainee/.local' -> './home/trainee/.local' 
 +'/home/trainee/.local/share' -> './home/trainee/.local/share' 
 +'/home/trainee/.local/share/evolution' -> './home/trainee/.local/share/evolution' 
 +'/home/trainee/.local/share/evolution/addressbook' -> './home/trainee/.local/share/evolution/addressbook' 
 +'/home/trainee/.local/share/evolution/addressbook/system' -> './home/trainee/.local/share/evolution/addressbook/system' 
 +'/home/trainee/.local/share/evolution/addressbook/system/contacts.db' -> './home/trainee/.local/share/evolution/addressbook/system/contacts.db' 
 +'/home/trainee/.local/share/evolution/addressbook/system/photos' -> './home/trainee/.local/share/evolution/addressbook/system/photos' 
 +'/home/trainee/.local/share/evolution/addressbook/trash' -> './home/trainee/.local/share/evolution/addressbook/trash' 
 +'/home/trainee/.local/share/evolution/mail' -> './home/trainee/.local/share/evolution/mail' 
 +'/home/trainee/.local/share/evolution/mail/trash' -> './home/trainee/.local/share/evolution/mail/trash' 
 +'/home/trainee/.local/share/evolution/tasks' -> './home/trainee/.local/share/evolution/tasks' 
 +'/home/trainee/.local/share/evolution/tasks/system' -> './home/trainee/.local/share/evolution/tasks/system' 
 +'/home/trainee/.local/share/evolution/tasks/system/tasks.ics' -> './home/trainee/.local/share/evolution/tasks/system/tasks.ics' 
 +'/home/trainee/.local/share/evolution/tasks/trash' -> './home/trainee/.local/share/evolution/tasks/trash' 
 +'/home/trainee/.local/share/evolution/calendar' -> './home/trainee/.local/share/evolution/calendar' 
 +'/home/trainee/.local/share/evolution/calendar/trash' -> './home/trainee/.local/share/evolution/calendar/trash' 
 +'/home/trainee/.local/share/evolution/calendar/system' -> './home/trainee/.local/share/evolution/calendar/system' 
 +'/home/trainee/.local/share/evolution/calendar/system/calendar.ics' -> './home/trainee/.local/share/evolution/calendar/system/calendar.ics' 
 +'/home/trainee/.local/share/evolution/memos' -> './home/trainee/.local/share/evolution/memos' 
 +'/home/trainee/.local/share/evolution/memos/trash' -> './home/trainee/.local/share/evolution/memos/trash' 
 +'/home/trainee/.local/share/applications' -> './home/trainee/.local/share/applications' 
 +'/home/trainee/.local/share/icc' -> './home/trainee/.local/share/icc' 
 +'/home/trainee/.local/share/icc/edid-bb6ad72dc802b000932c73ad20996ae5.icc' -> './home/trainee/.local/share/icc/edid-bb6ad72dc802b000932c73ad20996ae5.icc' 
 +'/home/trainee/.local/share/sounds' -> './home/trainee/.local/share/sounds' 
 +'/home/trainee/.local/share/flatpak' -> './home/trainee/.local/share/flatpak' 
 +'/home/trainee/.local/share/flatpak/repo' -> './home/trainee/.local/share/flatpak/repo' 
 +'/home/trainee/.local/share/flatpak/repo/refs' -> './home/trainee/.local/share/flatpak/repo/refs' 
 +'/home/trainee/.local/share/flatpak/repo/refs/heads' -> './home/trainee/.local/share/flatpak/repo/refs/heads' 
 +'/home/trainee/.local/share/flatpak/repo/refs/mirrors' -> './home/trainee/.local/share/flatpak/repo/refs/mirrors' 
 +'/home/trainee/.local/share/flatpak/repo/refs/remotes' -> './home/trainee/.local/share/flatpak/repo/refs/remotes' 
 +'/home/trainee/.local/share/flatpak/repo/objects' -> './home/trainee/.local/share/flatpak/repo/objects' 
 +'/home/trainee/.local/share/flatpak/repo/config' -> './home/trainee/.local/share/flatpak/repo/config' 
 +'/home/trainee/.local/share/flatpak/repo/tmp' -> './home/trainee/.local/share/flatpak/repo/tmp' 
 +'/home/trainee/.local/share/flatpak/repo/tmp/cache' -> './home/trainee/.local/share/flatpak/repo/tmp/cache' 
 +'/home/trainee/.local/share/flatpak/repo/extensions' -> './home/trainee/.local/share/flatpak/repo/extensions' 
 +'/home/trainee/.local/share/flatpak/repo/state' -> './home/trainee/.local/share/flatpak/repo/state' 
 +'/home/trainee/.local/share/flatpak/.changed' -> './home/trainee/.local/share/flatpak/.changed' 
 +'/home/trainee/.local/share/flatpak/db' -> './home/trainee/.local/share/flatpak/db' 
 +'/home/trainee/.local/share/pki' -> './home/trainee/.local/share/pki' 
 +'/home/trainee/.local/share/pki/nssdb' -> './home/trainee/.local/share/pki/nssdb' 
 +'/home/trainee/.local/share/keyrings' -> './home/trainee/.local/share/keyrings' 
 +'/home/trainee/.local/share/keyrings/login.keyring' -> './home/trainee/.local/share/keyrings/login.keyring' 
 +'/home/trainee/.local/share/keyrings/user.keystore' -> './home/trainee/.local/share/keyrings/user.keystore' 
 +'/home/trainee/.local/share/gnome-shell' -> './home/trainee/.local/share/gnome-shell' 
 +'/home/trainee/.local/share/gnome-shell/gnome-overrides-migrated' -> './home/trainee/.local/share/gnome-shell/gnome-overrides-migrated' 
 +'/home/trainee/.local/share/gnome-shell/application_state' -> './home/trainee/.local/share/gnome-shell/application_state' 
 +'/home/trainee/.local/share/gvfs-metadata' -> './home/trainee/.local/share/gvfs-metadata' 
 +'/home/trainee/.local/share/gvfs-metadata/home' -> './home/trainee/.local/share/gvfs-metadata/home' 
 +'/home/trainee/.local/share/gvfs-metadata/root-> './home/trainee/.local/share/gvfs-metadata/root' 
 +'/home/trainee/.local/share/gvfs-metadata/home-6f6e2002.log' -> './home/trainee/.local/share/gvfs-metadata/home-6f6e2002.log' 
 +'/home/trainee/.local/share/gvfs-metadata/root-47507e37.log' -> './home/trainee/.local/share/gvfs-metadata/root-47507e37.log' 
 +'/home/trainee/.local/share/gnome-settings-daemon' -> './home/trainee/.local/share/gnome-settings-daemon' 
 +'/home/trainee/.local/share/gnome-settings-daemon/input-sources-converted' -> './home/trainee/.local/share/gnome-settings-daemon/input-sources-converted' 
 +'/home/trainee/.local/state' -> './home/trainee/.local/state' 
 +'/home/trainee/.local/state/wireplumber' -> './home/trainee/.local/state/wireplumber' 
 +'/home/trainee/.local/state/wireplumber/restore-stream' -> './home/trainee/.local/state/wireplumber/restore-stream' 
 +'/home/trainee/Downloads' -> './home/trainee/Downloads' 
 +'/home/trainee/Music' -> './home/trainee/Music' 
 +'/home/trainee/.cache' -> './home/trainee/.cache' 
 +'/home/trainee/.cache/event-sound-cache.tdb.5a35a3eb625c45cea1d33535723e791f.x86_64-redhat-linux-gnu' -> './home/trainee/.cache/event-sound-cache.tdb.5a35a3eb625c45cea1d33535723e791f.x86_64-redhat-linux-gnu' 
 +'/home/trainee/.cache/gstreamer-1.0' -> './home/trainee/.cache/gstreamer-1.0' 
 +'/home/trainee/.cache/gstreamer-1.0/registry.x86_64.bin' -> './home/trainee/.cache/gstreamer-1.0/registry.x86_64.bin' 
 +'/home/trainee/.cache/appstream' -> './home/trainee/.cache/appstream' 
 +'/home/trainee/.cache/mesa_shader_cache' -> './home/trainee/.cache/mesa_shader_cache' 
 +'/home/trainee/.cache/mesa_shader_cache/35' -> './home/trainee/.cache/mesa_shader_cache/35' 
 +'/home/trainee/.cache/mesa_shader_cache/35/fdf1af19fe3030e69e8f1eb8e8b27af5336130' -> './home/trainee/.cache/mesa_shader_cache/35/fdf1af19fe3030e69e8f1eb8e8b27af5336130' 
 +'/home/trainee/.cache/mesa_shader_cache/37' -> './home/trainee/.cache/mesa_shader_cache/37' 
 +'/home/trainee/.cache/mesa_shader_cache/37/e5792d1d01536d5334b02004e37fb0e4447734' -> './home/trainee/.cache/mesa_shader_cache/37/e5792d1d01536d5334b02004e37fb0e4447734' 
 +'/home/trainee/.cache/mesa_shader_cache/db' -> './home/trainee/.cache/mesa_shader_cache/db' 
 +'/home/trainee/.cache/mesa_shader_cache/db/61eeaba3f7216beef1a6584479498f1a1bcc6e' -> './home/trainee/.cache/mesa_shader_cache/db/61eeaba3f7216beef1a6584479498f1a1bcc6e' 
 +'/home/trainee/.cache/mesa_shader_cache/89' -> './home/trainee/.cache/mesa_shader_cache/89' 
 +'/home/trainee/.cache/mesa_shader_cache/89/e5753098f3e9b475aea4ee27559d24e8a477cd' -> './home/trainee/.cache/mesa_shader_cache/89/e5753098f3e9b475aea4ee27559d24e8a477cd' 
 +'/home/trainee/.cache/mesa_shader_cache/89/f6154a1a3badafdf80810f15b7fcdcf76055f7' -> './home/trainee/.cache/mesa_shader_cache/89/f6154a1a3badafdf80810f15b7fcdcf76055f7' 
 +'/home/trainee/.cache/mesa_shader_cache/29' -> './home/trainee/.cache/mesa_shader_cache/29' 
 +'/home/trainee/.cache/mesa_shader_cache/29/192c9c298ee4c8c9fbf0ec63ef2235bd284281' -> './home/trainee/.cache/mesa_shader_cache/29/192c9c298ee4c8c9fbf0ec63ef2235bd284281' 
 +'/home/trainee/.cache/mesa_shader_cache/ba' -> './home/trainee/.cache/mesa_shader_cache/ba' 
 +'/home/trainee/.cache/mesa_shader_cache/ba/c8c6c30bb2fd3a6ad51b81489fba57176bdb63' -> './home/trainee/.cache/mesa_shader_cache/ba/c8c6c30bb2fd3a6ad51b81489fba57176bdb63' 
 +'/home/trainee/.cache/mesa_shader_cache/80' -> './home/trainee/.cache/mesa_shader_cache/80' 
 +'/home/trainee/.cache/mesa_shader_cache/80/51554895958b09bfcc357550bff8c7c91d3f13' -> './home/trainee/.cache/mesa_shader_cache/80/51554895958b09bfcc357550bff8c7c91d3f13' 
 +'/home/trainee/.cache/mesa_shader_cache/de' -> './home/trainee/.cache/mesa_shader_cache/de' 
 +'/home/trainee/.cache/mesa_shader_cache/de/594a26def33b0ccfc9b9af4ee0d1f15e01af73' -> './home/trainee/.cache/mesa_shader_cache/de/594a26def33b0ccfc9b9af4ee0d1f15e01af73' 
 +'/home/trainee/.cache/mesa_shader_cache/2c' -> './home/trainee/.cache/mesa_shader_cache/2c' 
 +'/home/trainee/.cache/mesa_shader_cache/2c/58c677aeedca2646d85af2feeaa58bcaba11cd' -> './home/trainee/.cache/mesa_shader_cache/2c/58c677aeedca2646d85af2feeaa58bcaba11cd' 
 +'/home/trainee/.cache/mesa_shader_cache/66' -> './home/trainee/.cache/mesa_shader_cache/66' 
 +'/home/trainee/.cache/mesa_shader_cache/66/189cc50668aeaf9534cda7798d819feafd56c7' -> './home/trainee/.cache/mesa_shader_cache/66/189cc50668aeaf9534cda7798d819feafd56c7' 
 +'/home/trainee/.cache/mesa_shader_cache/6e' -> './home/trainee/.cache/mesa_shader_cache/6e' 
 +'/home/trainee/.cache/mesa_shader_cache/6e/590e396934a1b10561cef716c8f8e4ab789a36' -> './home/trainee/.cache/mesa_shader_cache/6e/590e396934a1b10561cef716c8f8e4ab789a36' 
 +'/home/trainee/.cache/mesa_shader_cache/ed' -> './home/trainee/.cache/mesa_shader_cache/ed' 
 +'/home/trainee/.cache/mesa_shader_cache/ed/48dbafa506e7835391085c2b2979ffad8a8940' -> './home/trainee/.cache/mesa_shader_cache/ed/48dbafa506e7835391085c2b2979ffad8a8940' 
 +'/home/trainee/.cache/mesa_shader_cache/56' -> './home/trainee/.cache/mesa_shader_cache/56' 
 +'/home/trainee/.cache/mesa_shader_cache/56/520536fab9c4bd7b65662bdcc0099f3d1fd090' -> './home/trainee/.cache/mesa_shader_cache/56/520536fab9c4bd7b65662bdcc0099f3d1fd090' 
 +'/home/trainee/.cache/mesa_shader_cache/7b' -> './home/trainee/.cache/mesa_shader_cache/7b' 
 +'/home/trainee/.cache/mesa_shader_cache/7b/b2b9a86dde20d2ffe0c14d344d36dfae760c54' -> './home/trainee/.cache/mesa_shader_cache/7b/b2b9a86dde20d2ffe0c14d344d36dfae760c54' 
 +'/home/trainee/.cache/mesa_shader_cache/17' -> './home/trainee/.cache/mesa_shader_cache/17' 
 +'/home/trainee/.cache/mesa_shader_cache/17/7d02a06d53b04eae8fb946e8bff91c951d8dc3' -> './home/trainee/.cache/mesa_shader_cache/17/7d02a06d53b04eae8fb946e8bff91c951d8dc3' 
 +'/home/trainee/.cache/mesa_shader_cache/2f' -> './home/trainee/.cache/mesa_shader_cache/2f' 
 +'/home/trainee/.cache/mesa_shader_cache/2f/5b6e06b2728ebe3fa7976bcea3474fed301b2b' -> './home/trainee/.cache/mesa_shader_cache/2f/5b6e06b2728ebe3fa7976bcea3474fed301b2b' 
 +'/home/trainee/.cache/mesa_shader_cache/d0' -> './home/trainee/.cache/mesa_shader_cache/d0' 
 +'/home/trainee/.cache/mesa_shader_cache/d0/6fca52ab2f687b8e6f4c135e084e39bcb0c859' -> './home/trainee/.cache/mesa_shader_cache/d0/6fca52ab2f687b8e6f4c135e084e39bcb0c859' 
 +'/home/trainee/.cache/mesa_shader_cache/9e' -> './home/trainee/.cache/mesa_shader_cache/9e' 
 +'/home/trainee/.cache/mesa_shader_cache/9e/d50ad4e45ed562c3e7b4570526c4cc8154f214' -> './home/trainee/.cache/mesa_shader_cache/9e/d50ad4e45ed562c3e7b4570526c4cc8154f214' 
 +'/home/trainee/.cache/mesa_shader_cache/6c' -> './home/trainee/.cache/mesa_shader_cache/6c' 
 +'/home/trainee/.cache/mesa_shader_cache/6c/2e2e9047a693755c7cfdc286874dc0e3e30b4e' -> './home/trainee/.cache/mesa_shader_cache/6c/2e2e9047a693755c7cfdc286874dc0e3e30b4e' 
 +'/home/trainee/.cache/mesa_shader_cache/6c/3101d0fdf7a12f96507b4ac96b83de38448541' -> './home/trainee/.cache/mesa_shader_cache/6c/3101d0fdf7a12f96507b4ac96b83de38448541' 
 +'/home/trainee/.cache/mesa_shader_cache/d3' -> './home/trainee/.cache/mesa_shader_cache/d3' 
 +'/home/trainee/.cache/mesa_shader_cache/d3/075b420db4b80da890c1576f69ba7758421738' -> './home/trainee/.cache/mesa_shader_cache/d3/075b420db4b80da890c1576f69ba7758421738' 
 +'/home/trainee/.cache/mesa_shader_cache/e2' -> './home/trainee/.cache/mesa_shader_cache/e2' 
 +'/home/trainee/.cache/mesa_shader_cache/e2/eda2c17a911182ce0675a982c19d7ec332fe48' -> './home/trainee/.cache/mesa_shader_cache/e2/eda2c17a911182ce0675a982c19d7ec332fe48' 
 +'/home/trainee/.cache/mesa_shader_cache/3c' -> './home/trainee/.cache/mesa_shader_cache/3c' 
 +'/home/trainee/.cache/mesa_shader_cache/3c/5cfbfcea5eaa35a106d2bad38d8d89c7da4759' -> './home/trainee/.cache/mesa_shader_cache/3c/5cfbfcea5eaa35a106d2bad38d8d89c7da4759' 
 +'/home/trainee/.cache/mesa_shader_cache/61' -> './home/trainee/.cache/mesa_shader_cache/61' 
 +'/home/trainee/.cache/mesa_shader_cache/61/d347702600b207e1d67f23f11f089553172512' -> './home/trainee/.cache/mesa_shader_cache/61/d347702600b207e1d67f23f11f089553172512' 
 +'/home/trainee/.cache/mesa_shader_cache/03' -> './home/trainee/.cache/mesa_shader_cache/03' 
 +'/home/trainee/.cache/mesa_shader_cache/03/d956db16f83ba111f7e395ca2e6b7b3f83ff46' -> './home/trainee/.cache/mesa_shader_cache/03/d956db16f83ba111f7e395ca2e6b7b3f83ff46' 
 +'/home/trainee/.cache/mesa_shader_cache/a4' -> './home/trainee/.cache/mesa_shader_cache/a4' 
 +'/home/trainee/.cache/mesa_shader_cache/a4/a2550d53877cc1471892b1bec5444abc719ef8' -> './home/trainee/.cache/mesa_shader_cache/a4/a2550d53877cc1471892b1bec5444abc719ef8' 
 +'/home/trainee/.cache/mesa_shader_cache/ab' -> './home/trainee/.cache/mesa_shader_cache/ab' 
 +'/home/trainee/.cache/mesa_shader_cache/ab/d56ebc4a54bcc4e49aa3dde4fddb884ff797c1' -> './home/trainee/.cache/mesa_shader_cache/ab/d56ebc4a54bcc4e49aa3dde4fddb884ff797c1' 
 +'/home/trainee/.cache/mesa_shader_cache/b1' -> './home/trainee/.cache/mesa_shader_cache/b1' 
 +'/home/trainee/.cache/mesa_shader_cache/b1/8414b51e1825350f6af7ba143d082ba6e91338' -> './home/trainee/.cache/mesa_shader_cache/b1/8414b51e1825350f6af7ba143d082ba6e91338' 
 +'/home/trainee/.cache/mesa_shader_cache/c8' -> './home/trainee/.cache/mesa_shader_cache/c8' 
 +'/home/trainee/.cache/mesa_shader_cache/c8/d3f9f8d81fa2bafb1e8e03193e8861047adcde' -> './home/trainee/.cache/mesa_shader_cache/c8/d3f9f8d81fa2bafb1e8e03193e8861047adcde' 
 +'/home/trainee/.cache/mesa_shader_cache/df' -> './home/trainee/.cache/mesa_shader_cache/df' 
 +'/home/trainee/.cache/mesa_shader_cache/df/ad5863cff76ca47fcea0a47b9f8d81bf57c605' -> './home/trainee/.cache/mesa_shader_cache/df/ad5863cff76ca47fcea0a47b9f8d81bf57c605' 
 +'/home/trainee/.cache/mesa_shader_cache/index' -> './home/trainee/.cache/mesa_shader_cache/index' 
 +'/home/trainee/.cache/mesa_shader_cache/fc' -> './home/trainee/.cache/mesa_shader_cache/fc' 
 +'/home/trainee/.cache/mesa_shader_cache/fc/0a9b98f3ab91773422fdf596d8b90aa3f0319f' -> './home/trainee/.cache/mesa_shader_cache/fc/0a9b98f3ab91773422fdf596d8b90aa3f0319f' 
 +'/home/trainee/.cache/mesa_shader_cache/0f' -> './home/trainee/.cache/mesa_shader_cache/0f' 
 +'/home/trainee/.cache/mesa_shader_cache/0f/30c6ae612cca20f942383cf6c3d207a5fa23cc' -> './home/trainee/.cache/mesa_shader_cache/0f/30c6ae612cca20f942383cf6c3d207a5fa23cc' 
 +'/home/trainee/.cache/mesa_shader_cache/0f/10bb2c604d0ef8a698a506a297cc7a72885e1f' -> './home/trainee/.cache/mesa_shader_cache/0f/10bb2c604d0ef8a698a506a297cc7a72885e1f' 
 +'/home/trainee/.cache/mesa_shader_cache/9a' -> './home/trainee/.cache/mesa_shader_cache/9a' 
 +'/home/trainee/.cache/mesa_shader_cache/9a/32ee45d4531554f10a8184bf639fdf0a072fba' -> './home/trainee/.cache/mesa_shader_cache/9a/32ee45d4531554f10a8184bf639fdf0a072fba' 
 +'/home/trainee/.cache/mesa_shader_cache/9a/3061c95eb9135ea46575ef514f2fae7f4711cc' -> './home/trainee/.cache/mesa_shader_cache/9a/3061c95eb9135ea46575ef514f2fae7f4711cc' 
 +'/home/trainee/.cache/mesa_shader_cache/06' -> './home/trainee/.cache/mesa_shader_cache/06' 
 +'/home/trainee/.cache/mesa_shader_cache/06/3c901c6133c1b0568bb9b8ff1d4a35af6d8df4' -> './home/trainee/.cache/mesa_shader_cache/06/3c901c6133c1b0568bb9b8ff1d4a35af6d8df4' 
 +'/home/trainee/.cache/mesa_shader_cache/7c' -> './home/trainee/.cache/mesa_shader_cache/7c' 
 +'/home/trainee/.cache/mesa_shader_cache/7c/40694e298e691a0e7ac606cb160097a65c5fe9' -> './home/trainee/.cache/mesa_shader_cache/7c/40694e298e691a0e7ac606cb160097a65c5fe9' 
 +'/home/trainee/.cache/mesa_shader_cache/77' -> './home/trainee/.cache/mesa_shader_cache/77' 
 +'/home/trainee/.cache/mesa_shader_cache/77/390cf9430a3344e71ec336b898ff0af5362f27' -> './home/trainee/.cache/mesa_shader_cache/77/390cf9430a3344e71ec336b898ff0af5362f27' 
 +'/home/trainee/.cache/mesa_shader_cache/57' -> './home/trainee/.cache/mesa_shader_cache/57' 
 +'/home/trainee/.cache/mesa_shader_cache/57/b7f8fa574271b61ecbd67cfdbf0fbfa4e7309f' -> './home/trainee/.cache/mesa_shader_cache/57/b7f8fa574271b61ecbd67cfdbf0fbfa4e7309f' 
 +'/home/trainee/.cache/mesa_shader_cache/78' -> './home/trainee/.cache/mesa_shader_cache/78' 
 +'/home/trainee/.cache/mesa_shader_cache/78/37d600b50e8a23efed7bcb298703d700c4bdde' -> './home/trainee/.cache/mesa_shader_cache/78/37d600b50e8a23efed7bcb298703d700c4bdde' 
 +'/home/trainee/.cache/mesa_shader_cache/08' -> './home/trainee/.cache/mesa_shader_cache/08' 
 +'/home/trainee/.cache/mesa_shader_cache/08/c25769e6f0d114ee11363b6a006276457ba0fe' -> './home/trainee/.cache/mesa_shader_cache/08/c25769e6f0d114ee11363b6a006276457ba0fe' 
 +'/home/trainee/.cache/mesa_shader_cache/52' -> './home/trainee/.cache/mesa_shader_cache/52' 
 +'/home/trainee/.cache/mesa_shader_cache/52/675f8b2f5bf87b675ae31f54f2b3c412721c24' -> './home/trainee/.cache/mesa_shader_cache/52/675f8b2f5bf87b675ae31f54f2b3c412721c24' 
 +'/home/trainee/.cache/mesa_shader_cache/72' -> './home/trainee/.cache/mesa_shader_cache/72' 
 +'/home/trainee/.cache/mesa_shader_cache/72/6f5d4d61d416fbce8e03f0ba6f3be83b7617ef' -> './home/trainee/.cache/mesa_shader_cache/72/6f5d4d61d416fbce8e03f0ba6f3be83b7617ef' 
 +'/home/trainee/.cache/mesa_shader_cache/1d' -> './home/trainee/.cache/mesa_shader_cache/1d' 
 +'/home/trainee/.cache/mesa_shader_cache/1d/16707620c6d057cc29f510df219eae84cb9433' -> './home/trainee/.cache/mesa_shader_cache/1d/16707620c6d057cc29f510df219eae84cb9433' 
 +'/home/trainee/.cache/mesa_shader_cache/da' -> './home/trainee/.cache/mesa_shader_cache/da' 
 +'/home/trainee/.cache/mesa_shader_cache/da/35509cf05c257db6419f61347e3abcbfb47931' -> './home/trainee/.cache/mesa_shader_cache/da/35509cf05c257db6419f61347e3abcbfb47931' 
 +'/home/trainee/.cache/mesa_shader_cache/b2' -> './home/trainee/.cache/mesa_shader_cache/b2' 
 +'/home/trainee/.cache/mesa_shader_cache/b2/cfbf371328300a5b5d686da17d3722ea1ea680' -> './home/trainee/.cache/mesa_shader_cache/b2/cfbf371328300a5b5d686da17d3722ea1ea680' 
 +'/home/trainee/.cache/mesa_shader_cache/3d' -> './home/trainee/.cache/mesa_shader_cache/3d' 
 +'/home/trainee/.cache/mesa_shader_cache/3d/e830f90f2d4d3d79bba17a59903ad4aa4736ed' -> './home/trainee/.cache/mesa_shader_cache/3d/e830f90f2d4d3d79bba17a59903ad4aa4736ed' 
 +'/home/trainee/.cache/mesa_shader_cache/53' -> './home/trainee/.cache/mesa_shader_cache/53' 
 +'/home/trainee/.cache/mesa_shader_cache/53/5db4be69e145c6708f2d30c70b5a292464c990' -> './home/trainee/.cache/mesa_shader_cache/53/5db4be69e145c6708f2d30c70b5a292464c990' 
 +'/home/trainee/.cache/mesa_shader_cache/e7' -> './home/trainee/.cache/mesa_shader_cache/e7' 
 +'/home/trainee/.cache/mesa_shader_cache/e7/b2552c608263fa6b536e5aba787ce66bbb222b' -> './home/trainee/.cache/mesa_shader_cache/e7/b2552c608263fa6b536e5aba787ce66bbb222b' 
 +'/home/trainee/.cache/mesa_shader_cache/59' -> './home/trainee/.cache/mesa_shader_cache/59' 
 +'/home/trainee/.cache/mesa_shader_cache/59/87c57c825b5080423c1f92ee06f23998a21164' -> './home/trainee/.cache/mesa_shader_cache/59/87c57c825b5080423c1f92ee06f23998a21164' 
 +'/home/trainee/.cache/mesa_shader_cache/04' -> './home/trainee/.cache/mesa_shader_cache/04' 
 +'/home/trainee/.cache/mesa_shader_cache/04/7e399922091e12b6b1038ffd9d65cb8a8d4e52' -> './home/trainee/.cache/mesa_shader_cache/04/7e399922091e12b6b1038ffd9d65cb8a8d4e52' 
 +'/home/trainee/.cache/mesa_shader_cache/5e' -> './home/trainee/.cache/mesa_shader_cache/5e' 
 +'/home/trainee/.cache/mesa_shader_cache/5e/c3362db3becd652b156ef7cef7b65a14000175' -> './home/trainee/.cache/mesa_shader_cache/5e/c3362db3becd652b156ef7cef7b65a14000175' 
 +'/home/trainee/.cache/mesa_shader_cache/4b' -> './home/trainee/.cache/mesa_shader_cache/4b' 
 +'/home/trainee/.cache/mesa_shader_cache/4b/c7bfac6ba6440df22b676247a760ea33ef00e9' -> './home/trainee/.cache/mesa_shader_cache/4b/c7bfac6ba6440df22b676247a760ea33ef00e9' 
 +'/home/trainee/.cache/mesa_shader_cache/38' -> './home/trainee/.cache/mesa_shader_cache/38' 
 +'/home/trainee/.cache/mesa_shader_cache/38/ab4c0ec5a2678353a62e2adb585cac57621027' -> './home/trainee/.cache/mesa_shader_cache/38/ab4c0ec5a2678353a62e2adb585cac57621027' 
 +'/home/trainee/.cache/mesa_shader_cache/f0' -> './home/trainee/.cache/mesa_shader_cache/f0' 
 +'/home/trainee/.cache/mesa_shader_cache/f0/23c0293a789bd41028bbe52116a8050da78300' -> './home/trainee/.cache/mesa_shader_cache/f0/23c0293a789bd41028bbe52116a8050da78300' 
 +'/home/trainee/.cache/mesa_shader_cache/f0/fe14587cf5f14504a4d663d50b842ab6708459' -> './home/trainee/.cache/mesa_shader_cache/f0/fe14587cf5f14504a4d663d50b842ab6708459' 
 +'/home/trainee/.cache/mesa_shader_cache/0a' -> './home/trainee/.cache/mesa_shader_cache/0a' 
 +'/home/trainee/.cache/mesa_shader_cache/0a/2e07fbab5189565440428bc82a0b3716f1c7f9' -> './home/trainee/.cache/mesa_shader_cache/0a/2e07fbab5189565440428bc82a0b3716f1c7f9' 
 +'/home/trainee/.cache/mesa_shader_cache/21' -> './home/trainee/.cache/mesa_shader_cache/21' 
 +'/home/trainee/.cache/mesa_shader_cache/21/f7c9c648eaf6ad5386e464adf635c5fcbda019' -> './home/trainee/.cache/mesa_shader_cache/21/f7c9c648eaf6ad5386e464adf635c5fcbda019' 
 +'/home/trainee/.cache/mesa_shader_cache/41' -> './home/trainee/.cache/mesa_shader_cache/41' 
 +'/home/trainee/.cache/mesa_shader_cache/41/c7d27f4328971dfae62cbeeb047f4051f58de2' -> './home/trainee/.cache/mesa_shader_cache/41/c7d27f4328971dfae62cbeeb047f4051f58de2' 
 +'/home/trainee/.cache/mesa_shader_cache/2b' -> './home/trainee/.cache/mesa_shader_cache/2b' 
 +'/home/trainee/.cache/mesa_shader_cache/2b/a8165b2be71340b0d73b74a10311320d6c8cf2' -> './home/trainee/.cache/mesa_shader_cache/2b/a8165b2be71340b0d73b74a10311320d6c8cf2' 
 +'/home/trainee/.cache/mesa_shader_cache/13' -> './home/trainee/.cache/mesa_shader_cache/13' 
 +'/home/trainee/.cache/mesa_shader_cache/13/b31a6f63cea64dc9bbe84ea28710f135184274' -> './home/trainee/.cache/mesa_shader_cache/13/b31a6f63cea64dc9bbe84ea28710f135184274' 
 +'/home/trainee/.cache/mesa_shader_cache/c4' -> './home/trainee/.cache/mesa_shader_cache/c4' 
 +'/home/trainee/.cache/mesa_shader_cache/c4/9bbd97238c5299a3e74ac9606194a6bbe48334' -> './home/trainee/.cache/mesa_shader_cache/c4/9bbd97238c5299a3e74ac9606194a6bbe48334' 
 +'/home/trainee/.cache/mesa_shader_cache/63' -> './home/trainee/.cache/mesa_shader_cache/63' 
 +'/home/trainee/.cache/mesa_shader_cache/63/9e6e421d46d0b2e7802b4919b10a7c3cfb5a57' -> './home/trainee/.cache/mesa_shader_cache/63/9e6e421d46d0b2e7802b4919b10a7c3cfb5a57' 
 +'/home/trainee/.cache/ibus' -> './home/trainee/.cache/ibus' 
 +'/home/trainee/.cache/flatpak' -> './home/trainee/.cache/flatpak' 
 +'/home/trainee/.cache/flatpak/system-cache' -> './home/trainee/.cache/flatpak/system-cache' 
 +'/home/trainee/.cache/evolution' -> './home/trainee/.cache/evolution' 
 +'/home/trainee/.cache/evolution/addressbook' -> './home/trainee/.cache/evolution/addressbook' 
 +'/home/trainee/.cache/evolution/addressbook/trash' -> './home/trainee/.cache/evolution/addressbook/trash' 
 +'/home/trainee/.cache/evolution/mail' -> './home/trainee/.cache/evolution/mail' 
 +'/home/trainee/.cache/evolution/mail/trash' -> './home/trainee/.cache/evolution/mail/trash' 
 +'/home/trainee/.cache/evolution/sources' -> './home/trainee/.cache/evolution/sources' 
 +'/home/trainee/.cache/evolution/sources/trash' -> './home/trainee/.cache/evolution/sources/trash' 
 +'/home/trainee/.cache/evolution/calendar' -> './home/trainee/.cache/evolution/calendar' 
 +'/home/trainee/.cache/evolution/calendar/trash' -> './home/trainee/.cache/evolution/calendar/trash' 
 +'/home/trainee/.cache/evolution/memos' -> './home/trainee/.cache/evolution/memos' 
 +'/home/trainee/.cache/evolution/memos/trash' -> './home/trainee/.cache/evolution/memos/trash' 
 +'/home/trainee/.cache/evolution/tasks' -> './home/trainee/.cache/evolution/tasks' 
 +'/home/trainee/.cache/evolution/tasks/trash' -> './home/trainee/.cache/evolution/tasks/trash' 
 +'/home/trainee/.cache/gnome-software' -> './home/trainee/.cache/gnome-software' 
 +'/home/trainee/.cache/gnome-software/appstream' -> './home/trainee/.cache/gnome-software/appstream' 
 +'/home/trainee/.cache/gnome-software/appstream/components.xmlb' -> './home/trainee/.cache/gnome-software/appstream/components.xmlb' 
 +'/home/trainee/.cache/gnome-software/flatpak-system-default' -> './home/trainee/.cache/gnome-software/flatpak-system-default' 
 +'/home/trainee/.cache/gnome-software/flatpak-system-default/components.xmlb' -> './home/trainee/.cache/gnome-software/flatpak-system-default/components.xmlb' 
 +'/home/trainee/.cache/gnome-software/flatpak-user-user' -> './home/trainee/.cache/gnome-software/flatpak-user-user' 
 +'/home/trainee/.cache/gnome-software/flatpak-user-user/components.xmlb' -> './home/trainee/.cache/gnome-software/flatpak-user-user/components.xmlb' 
 +'/home/trainee/.cache/gnome-software/odrs' -> './home/trainee/.cache/gnome-software/odrs' 
 +'/home/trainee/.cache/gnome-software/odrs/ratings.json' -> './home/trainee/.cache/gnome-software/odrs/ratings.json' 
 +'/home/trainee/.bash_logout' -> './home/trainee/.bash_logout' 
 +'/home/trainee/.exrc' -> './home/trainee/.exrc' 
 +'/home/trainee/.viminfo' -> './home/trainee/.viminfo' 
 +'/home/trainee/vitext' -> './home/trainee/vitext' 
 +'/home/trainee/aac' -> './home/trainee/aac' 
 +'/home/trainee/abc' -> './home/trainee/abc' 
 +'/home/trainee/bca' -> './home/trainee/bca' 
 +'/home/trainee/xyz' -> './home/trainee/xyz' 
 +'/home/trainee/.lesshst' -> './home/trainee/.lesshst' 
 +'/home/trainee/errorlog' -> './home/trainee/errorlog' 
 +'/home/trainee/file' -> './home/trainee/file' 
 +'/home/trainee/file1' -> './home/trainee/file1' 
 +'/home/trainee/file2' -> './home/trainee/file2' 
 +'/home/trainee/list' -> './home/trainee/list' 
 +'/home/trainee/typescript' -> './home/trainee/typescript' 
 +'/home/trainee/Templates' -> './home/trainee/Templates' 
 +'/home/trainee/Pictures' -> './home/trainee/Pictures' 
 +'/home/trainee/.bash_profile' -> './home/trainee/.bash_profile' 
 +'/home/trainee/.bashrc' -> './home/trainee/.bashrc' 
 +'/home/trainee/.bash_history' -> './home/trainee/.bash_history' 
 +'/home/trainee/Public' -> './home/trainee/Public' 
 +'/home/trainee/Videos' -> './home/trainee/Videos' 
 +'/home/trainee/.mozilla' -> './home/trainee/.mozilla' 
 +'/home/trainee/.mozilla/extensions' -> './home/trainee/.mozilla/extensions' 
 +'/home/trainee/.mozilla/plugins' -> './home/trainee/.mozilla/plugins'
 </code> </code>
  
-Pour reprendre le processus en arrière plan, sans le ramener en avant plan, on utilise la commande kill avec l'option **-cont** :+<WRAP center round important 60%> 
 +**Important** - Il convient ensuite de sauvegarder le dossier **/root/home** sur un support externe. 
 +</WRAP> 
 + 
 +====La Commande Rsync==== 
 + 
 +===Présentation=== 
 + 
 +**Rsync** ou //Remote Sync// est un utilitaire de synchronisation de fichiers qui utilise un algorithme qui minimise la quantité de données copiée en ne copiant que les parties des fichiers qui ont été modifiées. 
 + 
 +===LAB #5 - Travailler avec la Commande rsync=== 
 + 
 +Créez les répertoires **/test/repA** et mkdir **/test/repB** :
  
 <code> <code>
-[root@centos8 ~]# kill -cont %2 +[root@redhat9 ~]# mkdir -p /test/repA; mkdir /test/repB
-[root@centos8 ~]# jobs -l +
-[1]-  1865 Running                 sleep 9999 & +
-[2]+  1874 Running                 sleep 1234 &+
 </code> </code>
  
-Pour ramener le processus en avant plan, on utilise la commande fg +Créez maintenant 20 fichiers vides dans le répertoire **/test/repA** :
  
 <code> <code>
-[root@centos8 ~]# kill -stop %2+[root@redhat9 ~]# touch /test/repA/file{1..20} 
 +[root@redhat9 ~]# ls -l /test/repA/ 
 +total 0 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file1 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file10 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file11 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file12 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file13 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file14 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file15 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file16 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file17 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file18 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file19 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file2 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file20 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file3 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file4 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file5 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file6 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file7 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file8 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file9 
 +</code>
  
-[2]+  Stopped                 sleep 1234 +Pout synchroniser les fichiers de **/test/repA** vers le répertoire **/test/repB**, utilisez l'option **-r** de la commande rsync : 
-[root@centos8 ~]# jobs -l + 
-[1] 1865 Running                 sleep 9999 & +<code> 
-[2]+  1874 Stopped (signal)        sleep 1234 +[root@redhat9 ~]# rsync -r /test/repA/ /test/repB 
-[root@centos8 ~]# fg %2 +[root@redhat9 ~]# ls -l /test/repB/ 
-sleep 1234 +total 0 
-^C +-rw-r--r--. root root 0 Sep 27 11:45 file1 
-[root@centos8 ~]# +-rw-r--r--. 1 root root 0 Sep 27 11:45 file10 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file11 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file12 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file13 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file14 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file15 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file16 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file17 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file18 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file19 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file2 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file20 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file3 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file4 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file5 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file6 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file7 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file8 
 +-rw-r--r--. 1 root root 0 Sep 27 11:45 file9
 </code> </code>
  
-<WRAP center round important> +<WRAP center round important 60%
-**Important** - Notez l'utilisation des touches <key>Ctrl</key><key>c</key> pour tuer le processus en avant plan.+**Important** - Notez que l'horodatage des fichiers synchronisés n'a pas été préservé.
 </WRAP> </WRAP>
  
-Les options de la commande jobs sont :+Supprimez les fichiers dans **/test/repB** :
  
 <code> <code>
-[root@centos8 ~]# help jobs +[root@redhat9 ~]# rm -rf /test/repB/* 
-jobs: jobs [-lnprs[jobspec ...] or jobs -x command [args] +[root@redhat9 ~]# ls -l /test/repB/ 
-    Display status of jobs. +total 0
-     +
-    Lists the active jobs.  JOBSPEC restricts output to that job. +
-    Without options, the status of all active jobs is displayed. +
-     +
-    Options: +
-      -l lists process IDs in addition to the normal information +
-      -n lists only processes that have changed status since the last +
-    notification +
-      -p lists process IDs only +
-      -r restrict output to running jobs +
-      -s restrict output to stopped jobs +
-     +
-    If -x is supplied, COMMAND is run after all job specifications that +
-    appear in ARGS have been replaced with the process ID of that job'+
-    process group leader. +
-     +
-    Exit Status: +
-    Returns success unless an invalid option is given or an error occurs. +
-    If -x is used, returns the exit status of COMMAND+
 </code> </code>
  
-====1.6 La Commande wait====+Pour synchroniser les fichiers de **/test/repA** vers le répertoire **/test/repB**, utilisez l'option **-a** de la commande rsync :
  
-Cette commande permet de doter un processus asynchrone du comportement d'un processus synchrone. Elle est utilisée pour attendre jusqu’à ce qu'un processus en tâche de fond soit terminé :+<code> 
 +[root@redhat9 ~]# rsync -a /test/repA/ /test/repB 
 +[root@redhat9 ~]# ls -l /test/repB/ 
 +total 0 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file1 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file10 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file11 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file12 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file13 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file14 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file15 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file16 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file17 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file18 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file19 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file2 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file20 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file3 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file4 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file5 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file6 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file7 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file8 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file9 
 +</code> 
 + 
 +<WRAP center round important 60%> 
 +**Important** - Notez que non seulement l'option **-a** de la commande **rsync** synchronise les fichiers d'une manière récursive, toute comme l'option **-r**, mais elle préserve aussi les fichiers spéciaux, les liens symboliques, les permissions, les propriétaires, les groupes ainsi que les dates de modification des fichiers. 
 +</WRAP> 
 + 
 +De nouveau, supprimez les fichiers dans le répertoire **/test/repB** :
  
 <code> <code>
-[root@centos8 ~]# jobs -l +[root@redhat9 ~]# rm -rf /test/repB/
-[1]+  1865 Running                 sleep 9999 & +[root@redhat9 ~]# ls -l /test/repB/ 
-[root@centos8 ~]# wait %1 +total 0 
-^C +</code> 
-[root@centos8 ~]# jobs -l + 
-[1]+  1865 Running                 sleep 9999 &+Exécutez maintenant le commande suivante et constatez le résultat : 
 + 
 +<code> 
 +[root@redhat9 ~]# rsync -a /test/repA /test/repB 
 +[root@redhat9 ~]# ls -l /test/repB/ 
 +total 4 
 +drwxr-xr-x. 2 root root 4096 Sep 27 11:43 repA 
 +[root@redhat9 ~]# ls -l /test/repB/repA/ 
 +total 0 
 +-rw-r--r--. root root 0 Sep 27 11:43 file1 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file10 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file11 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file12 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file13 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file14 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file15 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file16 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file17 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file18 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file19 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file2 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file20 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file3 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file4 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file5 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file6 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file7 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file8 
 +-rw-r--r--. 1 root root 0 Sep 27 11:43 file9
 </code> </code>
  
-<WRAP center round important> +<WRAP center round important 60%
-**Important** - Notez que l'utilisation des touches <key>Ctrl</key><key>c</key> tue le processus généré par la commande **wait** et non le processus généré par la commande **sleep**.+**Important** - Notez que dans ce cas, le caractère **/** est manquant après **repA** dans la commande **rsync -a /test/repA /test/repB**. Le résultat est la synchronisation du **répertoire** **/test/repA** vers **/test/repB**.
 </WRAP> </WRAP>
  
-====1.7 La Commande nice====+Pour éviter des erreurs, la commande **rsync** vous permet de visualiser le résultat de votre commande sans exécuter la commande grâce à l'utilisation des options **-n** et **-r**.
  
-Cette commande affiche ou modifie la priorité d’un processus. La priorité par défaut de nice est 10. La valeur de nice la plus prioritaire est -20. La valeur la moins prioritaire est 19 :+De nouveau, supprimez les fichiers dans le répertoire **/test/repB** :
  
 <code> <code>
-[root@centos8 ~]# nice -n -20 sleep 1234 +[root@redhat9 ~]# rm -rf /test/repB/* 
-^Z +[root@redhat9 ~]# ls -/test/repB
-[2]+  Stopped                 nice -n -20 sleep 1234 +total 0
-[root@centos8 ~]# ps lx | grep sleep +
-0        1865    1634  20     7284   816 hrtime S    pts/0      0:00 sleep 9999 +
-0        1998     853  20     7284   832 hrtime S    ?          0:00 sleep 60 +
-4        1999    1634   0 -20   7284   728 -      T<   pts/0      0:00 sleep 1234 +
-0        2001    1634  20    12112  1072 -      S+   pts/0      0:00 grep --color=auto sleep +
-[root@centos8 ~]# nice -n 19 sleep 5678 +
-^Z +
-[3]+  Stopped                 nice -n 19 sleep 5678 +
-[root@centos8 ~]# ps lx | grep sleep +
-0        1865    1634  20     7284   816 hrtime S    pts/0      0:00 sleep 9999 +
-4        1999    1634   0 -20   7284   728 -      T<   pts/0      0:00 sleep 1234 +
-0        2008    1634  39  19   7284   800 -      TN   pts/0      0:00 sleep 5678 +
-    0    2016     853  20     7284   784 hrtime S    ?          0:00 sleep 60 +
-0        2018    1634  20    12112  1076 -      S+   pts/     0:00 grep --color=auto sleep+
 </code> </code>
  
-Comme vous pouvez constater la 6ième colonne contient la valeur de nice qui s'applique à la priorité dans la colonne 5+Exécutez la commande ci-dessous : 
 + 
 +<code> 
 +[root@redhat9 ~]# rsync -anv /test/repA/ /test/repB 
 +sending incremental file list 
 +./ 
 +file1 
 +file10 
 +file11 
 +file12 
 +file13 
 +file14 
 +file15 
 +file16 
 +file17 
 +file18 
 +file19 
 +file2 
 +file20 
 +file3 
 +file4 
 +file5 
 +file6 
 +file7 
 +file8 
 +file9 
 + 
 +sent 387 bytes  received 79 bytes  932.00 bytes/sec 
 +total size is 0  speedup is 0.00 (DRY RUN) 
 + 
 +[root@redhat9 ~]# ls -l /test/repB/ 
 +total 0 
 +</code>
  
-<WRAP center round important> +<WRAP center round important 60%
-**Important** - Notez que seul root peut lancer des processus avec une valeur négative.+**Important** - Notez que dans ce cas, le résultat de la synchronisation est d'envoyer le **contenu** du répertoire **/test/repA** vers **/test/repB**.
 </WRAP> </WRAP>
  
-Les options de cette commande sont :+Maintenant, exécutez la commande ci-dessous :
  
 <code> <code>
-[root@centos8 ~]# nice --help +[root@redhat9 ~]# rsync -anv /test/repA /test/repB 
-Usage: nice [OPTION] [COMMAND [ARG]...] +sending incremental file list 
-Run COMMAND with an adjusted nicenesswhich affects process scheduling+repA/ 
-With no COMMAND, print the current niceness.  Niceness values range from +repA/file1 
--20 (most favorable to the processto 19 (least favorable to the process).+repA/file10 
 +repA/file11 
 +repA/file12 
 +repA/file13 
 +repA/file14 
 +repA/file15 
 +repA/file16 
 +repA/file17 
 +repA/file18 
 +repA/file19 
 +repA/file2 
 +repA/file20 
 +repA/file3 
 +repA/file4 
 +repA/file5 
 +repA/file6 
 +repA/file7 
 +repA/file8 
 +repA/file9 
 + 
 +sent 397 bytes  received 80 bytes  954.00 bytes/sec 
 +total size is 0  speedup is 0.00 (DRY RUN) 
 + 
 +[root@redhat9 ~]# ls -l /test/repB/ 
 +total 0 
 +</code> 
 + 
 +<WRAP center round important 60%> 
 +**Important** - Notez que dans ce cas, le résultat de la synchronisation est d'envoyer le répertoire **/test/repA** vers **/test/repB**. 
 +</WRAP> 
 + 
 +===Options de la Commande=== 
 + 
 +Les options de la commande rsync sont : 
 + 
 +<code> 
 +[root@redhat9 ~]# rsync --help 
 +rsync  version 3.2.3  protocol version 31 
 +Copyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others. 
 +Web site: https://rsync.samba.org/ 
 +Capabilities: 
 +    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints, 
 +    socketpairs, hardlinks, hardlink-specials, symlinks, IPv6, atimes, 
 +    batchfiles, inplace, append, ACLs, xattrs, optional protect-args, iconv, 
 +    symtimes, prealloc, stop-at, no crtimes 
 +Optimizations: 
 +    SIMD, asm, openssl-crypto 
 +Checksum list: 
 +    md5 md4 none 
 +Compress list: 
 +    zstd lz4 zlibx zlib none 
 + 
 +rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you 
 +are welcome to redistribute it under certain conditions.  See the GNU 
 +General Public Licence for details. 
 + 
 +rsync is a file transfer program capable of efficient remote update 
 +via a fast differencing algorithm. 
 + 
 +Usage: rsync [OPTION]... SRC [SRC]... DEST 
 +  or   rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST 
 +  or   rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST 
 +  or   rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST 
 +  or   rsync [OPTION]... [USER@]HOST:SRC [DEST] 
 +  or   rsync [OPTION]... [USER@]HOST::SRC [DEST] 
 +  or   rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST] 
 +The ':' usages connect via remote shell, while '::' & 'rsync://' usages connect 
 +to an rsync daemonand require SRC or DEST to start with a module name
 + 
 +Options 
 +--verbose, -v            increase verbosity 
 +--info=FLAGS             fine-grained informational verbosity 
 +--debug=FLAGS            fine-grained debug verbosity 
 +--stderr=e|a|c           change stderr output mode (default: errors) 
 +--quiet, -q              suppress non-error messages 
 +--no-motd                suppress daemon-mode MOTD 
 +--checksum, -c           skip based on checksum, not mod-time & size 
 +--archive, -a            archive mode; equals -rlptgoD (no -H,-A,-X) 
 +--no-OPTION              turn off an implied OPTION (e.g. --no-D) 
 +--recursive, -r          recurse into directories 
 +--relative, -R           use relative path names 
 +--no-implied-dirs        don't send implied dirs with --relative 
 +--backup, -b             make backups (see --suffix & --backup-dir) 
 +--backup-dir=DIR         make backups into hierarchy based in DIR 
 +--suffix=SUFFIX          backup suffix (default ~ w/o --backup-dir) 
 +--update, -u             skip files that are newer on the receiver 
 +--inplace                update destination files in-place 
 +--append                 append data onto shorter files 
 +--append-verify          --append w/old data in file checksum 
 +--dirs, -d               transfer directories without recursing 
 +--mkpath                 create the destination's path component 
 +--links, -l              copy symlinks as symlinks 
 +--copy-links, -L         transform symlink into referent file/dir 
 +--copy-unsafe-links      only "unsafe" symlinks are transformed 
 +--safe-links             ignore symlinks that point outside the tree 
 +--munge-links            munge symlinks to make them safe & unusable 
 +--copy-dirlinks, -k      transform symlink to dir into referent dir 
 +--keep-dirlinks, -K      treat symlinked dir on receiver as dir 
 +--hard-links, -H         preserve hard links 
 +--perms, -p              preserve permissions 
 +--executability, -E      preserve executability 
 +--chmod=CHMOD            affect file and/or directory permissions 
 +--acls, -A               preserve ACLs (implies --perms) 
 +--xattrs, -X             preserve extended attributes 
 +--owner, -o              preserve owner (super-user only) 
 +--group, -g              preserve group 
 +--devices                preserve device files (super-user only) 
 +--copy-devices           copy device contents as regular file 
 +--specials               preserve special files 
 +-D                       same as --devices --specials 
 +--times, -t              preserve modification times 
 +--atimes, -U             preserve access (use) times 
 +--open-noatime           avoid changing the atime on opened files 
 +--crtimes, -N            preserve create times (newness) 
 +--omit-dir-times, -O     omit directories from --times 
 +--omit-link-times, -J    omit symlinks from --times 
 +--super                  receiver attempts super-user activities 
 +--fake-super             store/recover privileged attrs using xattrs 
 +--sparse, -S             turn sequences of nulls into sparse blocks 
 +--preallocate            allocate dest files before writing them 
 +--write-devices          write to devices as files (implies --inplace) 
 +--dry-run, -n            perform a trial run with no changes made 
 +--whole-file, -W         copy files whole (w/o delta-xfer algorithm) 
 +--checksum-choice=STR    choose the checksum algorithm (aka --cc) 
 +--one-file-system, -x    don't cross filesystem boundaries 
 +--block-size=SIZE, -B    force a fixed checksum block-size 
 +--rsh=COMMAND, -e        specify the remote shell to use 
 +--rsync-path=PROGRAM     specify the rsync to run on remote machine 
 +--existing               skip creating new files on receiver 
 +--ignore-existing        skip updating files that exist on receiver 
 +--remove-source-files    sender removes synchronized files (non-dir) 
 +--del                    an alias for --delete-during 
 +--delete                 delete extraneous files from dest dirs 
 +--delete-before          receiver deletes before xfer, not during 
 +--delete-during          receiver deletes during the transfer 
 +--delete-delay           find deletions during, delete after 
 +--delete-after           receiver deletes after transfer, not during 
 +--delete-excluded        also delete excluded files from dest dirs 
 +--ignore-missing-args    ignore missing source args without error 
 +--delete-missing-args    delete missing source args from destination 
 +--ignore-errors          delete even if there are I/O errors 
 +--force                  force deletion of dirs even if not empty 
 +--max-delete=NUM         don't delete more than NUM files 
 +--max-size=SIZE          don't transfer any file larger than SIZE 
 +--min-size=SIZE          don't transfer any file smaller than SIZE 
 +--max-alloc=SIZE         change a limit relating to memory alloc 
 +--partial                keep partially transferred files 
 +--partial-dir=DIR        put a partially transferred file into DIR 
 +--delay-updates          put all updated files into place at end 
 +--prune-empty-dirs, -m   prune empty directory chains from file-list 
 +--numeric-ids            don't map uid/gid values by user/group name 
 +--usermap=STRING         custom username mapping 
 +--groupmap=STRING        custom groupname mapping 
 +--chown=USER:GROUP       simple username/groupname mapping 
 +--timeout=SECONDS        set I/O timeout in seconds 
 +--contimeout=SECONDS     set daemon connection timeout in seconds 
 +--ignore-times, -I       don't skip files that match size and time 
 +--size-only              skip files that match in size 
 +--modify-window=NUM, -@  set the accuracy for mod-time comparisons 
 +--temp-dir=DIR, -T       create temporary files in directory DIR 
 +--fuzzy, -y              find similar file for basis if no dest file 
 +--compare-dest=DIR       also compare destination files relative to DIR 
 +--copy-dest=DIR          ... and include copies of unchanged files 
 +--link-dest=DIR          hardlink to files in DIR when unchanged 
 +--compress, -z           compress file data during the transfer 
 +--compress-choice=STR    choose the compression algorithm (aka --zc) 
 +--compress-level=NUM     explicitly set compression level (aka --zl) 
 +--skip-compress=LIST     skip compressing files with suffix in LIST 
 +--cvs-exclude, -C        auto-ignore files in the same way CVS does 
 +--filter=RULE, -f        add a file-filtering RULE 
 +-F                       same as --filter='dir-merge /.rsync-filter' 
 +                         repeated: --filter='- .rsync-filter' 
 +--exclude=PATTERN        exclude files matching PATTERN 
 +--exclude-from=FILE      read exclude patterns from FILE 
 +--include=PATTERN        don't exclude files matching PATTERN 
 +--include-from=FILE      read include patterns from FILE 
 +--files-from=FILE        read list of source-file names from FILE 
 +--from0, -0              all *-from/filter files are delimited by 0s 
 +--protect-args, -s       no space-splitting; wildcard chars only 
 +--copy-as=USER[:GROUP]   specify user & optional group for the copy 
 +--address=ADDRESS        bind address for outgoing socket to daemon 
 +--port=PORT              specify double-colon alternate port number 
 +--sockopts=OPTIONS       specify custom TCP options 
 +--blocking-io            use blocking I/O for the remote shell 
 +--outbuf=N|L|B           set out buffering to None, Line, or Block 
 +--stats                  give some file-transfer stats 
 +--8-bit-output, -8       leave high-bit chars unescaped in output 
 +--human-readable, -h     output numbers in a human-readable format 
 +--progress               show progress during transfer 
 +-P                       same as --partial --progress 
 +--itemize-changes, -i    output a change-summary for all updates 
 +--remote-option=OPT, -M  send OPTION to the remote side only 
 +--out-format=FORMAT      output updates using the specified FORMAT 
 +--log-file=FILE          log what we're doing to the specified FILE 
 +--log-file-format=FMT    log updates using the specified FMT 
 +--password-file=FILE     read daemon-access password from FILE 
 +--early-input=FILE       use FILE for daemon's early exec input 
 +--list-only              list the files instead of copying them 
 +--bwlimit=RATE           limit socket I/O bandwidth 
 +--stop-after=MINS        Stop rsync after MINS minutes have elapsed 
 +--stop-at=y-m-dTh:     Stop rsync at the specified point in time 
 +--write-batch=FILE       write a batched update to FILE 
 +--only-write-batch=FILE  like --write-batch but w/o updating dest 
 +--read-batch=FILE        read a batched update from FILE 
 +--protocol=NUM           force an older protocol version to be used 
 +--iconv=CONVERT_SPEC     request charset conversion of filenames 
 +--checksum-seed=NUM      set block/file checksum seed (advanced) 
 +--ipv4, -4               prefer IPv4 
 +--ipv6, -6               prefer IPv6 
 +--version, -V            print the version + other info and exit 
 +--help, -h (*          show this help (* -h is help only on its own) 
 + 
 +Use "rsync --daemon --help" to see the daemon-mode command-line options. 
 +Please see the rsync(1) and rsyncd.conf(5) man pages for full documentation. 
 +See https://rsync.samba.org/ for updates, bug reports, and answers 
 +</code> 
 + 
 +=====Compression===== 
 + 
 +====La Commande gzip==== 
 + 
 +===Présentation=== 
 + 
 +La commande **gzip** est un utilitaire de compression sous GNU/Linux. La commande **gunzip** est un utilitaire de décompression sous GNU/Linux. 
 + 
 +===Options des Commandes=== 
 + 
 +Les options de la commande **gzip** sont : 
 + 
 +<code> 
 +[root@redhat9 ~]# gzip --help 
 +Usage: gzip [OPTION]... [FILE]... 
 +Compress or uncompress FILEs (by default, compress FILES in-place).
  
 Mandatory arguments to long options are mandatory for short options too. Mandatory arguments to long options are mandatory for short options too.
-  -n, --adjustment=N   add integer N to the niceness (default 10) 
-      --help     display this help and exit 
-      --version  output version information and exit 
  
-NOTE: your shell may have its own version of nicewhich usually supersedes +  -c, --stdout      write on standard output, keep original files unchanged 
-the version described here.  Please refer to your shell's documentation +  -d, --decompress  decompress 
-for details about the options it supports.+  -f, --force       force overwrite of output file and compress links 
 +  -h--help        give this help 
 +  -k, --keep        keep (don't delete) input files 
 +  -l, --list        list compressed file contents 
 +  -L, --license     display software license 
 +  -n, --no-name     do not save or restore the original name and timestamp 
 +  -N, --name        save or restore the original name and timestamp 
 +  -q, --quiet       suppress all warnings 
 +  -r, --recursive   operate recursively on directories 
 +      --rsyncable   make rsync-friendly archive 
 +  -S, --suffix=SUF  use suffix SUF on compressed files 
 +      --synchronous synchronous output (safer if system crashes, but slower) 
 +  -t, --test        test compressed file integrity 
 +  -v, --verbose     verbose mode 
 +  -V, --version     display version number 
 +  -1, --fast        compress faster 
 +  -9, --best        compress better
  
-GNU coreutils online help: <https://www.gnu.org/software/coreutils/> +With no FILE, or when FILE is -, read standard input
-Full documentation at: <https://www.gnu.org/software/coreutils/nice> + 
-or available locally via: info '(coreutils) nice invocation'+Report bugs to <bug-gzip@gnu.org>.
 </code> </code>
  
-====1.8 - La Commande renice====+Les options de la commande **gunzip** sont :
  
-Cette commande modifie la priorité d’un processus déjà en cours. La valeur de la priorité ne peut être modifiée que par le propriétaire du processus ou par root.+<code> 
 +[root@redhat9 ~]# gunzip --help 
 +Usage: /usr/bin/gunzip [OPTION]... [FILE]... 
 +Uncompress FILEs (by default, in-place). 
 + 
 +Mandatory arguments to long options are mandatory for short options too. 
 + 
 +  -c, --stdout      write on standard output, keep original files unchanged 
 +  -f, --force       force overwrite of output file and compress links 
 +  -k, --keep        keep (don't delete) input files 
 +  -l, --list        list compressed file contents 
 +  -n, --no-name     do not save or restore the original name and timestamp 
 +  -N, --name        save or restore the original name and timestamp 
 +  -q, --quiet       suppress all warnings 
 +  -r, --recursive   operate recursively on directories 
 +  -S, --suffix=SUF  use suffix SUF on compressed files 
 +      --synchronous synchronous output (safer if system crashes, but slower) 
 +  -t, --test        test compressed file integrity 
 +  -v, --verbose     verbose mode 
 +      --help        display this help and exit 
 +      --version     display version information and exit 
 + 
 +With no FILE, or when FILE is -, read standard input. 
 + 
 +Report bugs to <bug-gzip@gnu.org>
 +</code> 
 + 
 +===LAB #6 - Travailler avec la Commande gzip=== 
 + 
 +Utilisez **gzip** pour compresser votre fichier tar :
  
 <code> <code>
-[root@centos8 ~]# jobs -l +[root@redhat9 ~]# gzip /tmp/test.tar
-[1]   1865 Running                 sleep 9999 & +
-[2]-  1999 Stopped                 nice -n -20 sleep 1234 +
-[3]+  2008 Stopped                 nice -n 19 sleep 5678 +
-[root@centos8 ~]# bg %2 +
-[2]- nice -n -20 sleep 1234 & +
-[root@centos8 ~]# bg %3 +
-[3]+ nice -n 19 sleep 5678 & +
-[root@centos8 ~]# jobs -l +
-[1]   1865 Running                 sleep 9999 & +
-[2]-  1999 Running                 nice -n -20 sleep 1234 & +
-[3]+  2008 Running                 nice -n 19 sleep 5678 & +
-[root@centos8 ~]# renice +5 1999 +
-1999 (process ID) old priority -20, new priority 5 +
-[root@centos8 ~]# renice -5 2008 +
-2008 (process ID) old priority 19, new priority -5 +
-[root@centos8 ~]# ps lx | grep sleep +
-0        1865    1634  20     7284   816 hrtime S    pts/0      0:00 sleep 9999 +
-4        1999    1634  25     7284   728 -      SN   pts/     0:00 sleep 1234 +
-0        2008    1634  15  -5   7284   800 -      S<   pts/0      0:00 sleep 5678 +
-0        2061     853  20     7284   708 hrtime S    ?          0:00 sleep 60 +
-0        2064    1634  20    12112  1088 -      S+   pts/0      0:00 grep --color=auto sleep+
 </code> </code>
  
-<WRAP center round important> +Constatez la taille du fichier **test.tar.gz** : 
-**Important** -Notez que seul root peut décrémenter la valeur de priorité avec la commande renice.+ 
 +<code> 
 +[root@redhat9 ~]# ls -l /tmp/test.tar.gz 
 +-rw-r--r--. 1 root root 222 Sep 27 07:57 /tmp/test.tar.gz 
 +</code> 
 + 
 +<WRAP center round important 60%
 +**Important** - Notez que le fichier compressé a été créé dans le même répertoire que le fichier source et que le fichier source a disparu.
 </WRAP> </WRAP>
  
-Les options de cette commande sont :+Décompressez le fichier test.tar.gz :
  
 <code> <code>
-[root@centos8 ~]# renice --help+[root@redhat9 ~]# gunzip /tmp/test.tar.gz  
 +</code>
  
-Usage: +====La Commande bzip2====
- renice [-n] <priority> [-p|--pid] <pid>... +
- renice [-n] <priority>  -g|--pgrp <pgid>... +
- renice [-n] <priority>  -u|--user <user>...+
  
-Alter the priority of running processes.+===Présentation===
  
-Options: +La commande **bzip2** est un utilitaire de compression sous GNU/Linux. La commande **bunzip2** est un utilitaire de décompression sous GNU/Linux.
- -n, --priority <num>   specify the nice increment value +
- -p, --pid <id>         interpret argument as process ID (default) +
- -g, --pgrp <id>        interpret argument as process group ID +
- -u, --user <name>|<id> interpret argument as username or user ID+
  
- -h, --help             display this help +===Options des Commandes===
- -V, --version          display version+
  
-For more details see renice(1). +Les options de la commande **bzip2** sont :
-</code>+
  
-====1.La Commande nohup====+<code> 
 +[root@redhat9 ~]# bzip2 --help 
 +bzip2, a block-sorting file compressor.  Version 1.0.8, 13-Jul-2019.
  
-Cette commande permet à un processus de poursuivre son exécution après la déconnexion. Un processus enfant meurt quand le processus parent meure ou se termine. Comme une connexion est un processus, quand vous vous déconnectez, vos processus se terminent. Pour éviter de rester connecté après avoir lancé un processus long, vous utiliserez la commande nohup :+   usagebzip2 [flags and input files in any order]
  
-<file> +   -h --help           print this message 
-nohup lp ventes.txt +   -d --decompress     force decompression 
-</file>+   -z --compress       force compression 
 +   -k --keep           keep (don't delete) input files 
 +   -f --force          overwrite existing output files 
 +   -t --test           test compressed file integrity 
 +   -c --stdout         output to standard out 
 +   -q --quiet          suppress noncritical error messages 
 +   -v --verbose        be verbose (a 2nd -v gives more) 
 +   -L --license        display software version license 
 +   -V --version        display software version & license 
 +   -s --small          use less memory (at most 2500k) 
 +   -1 .. -9            set block size to 100k .. 900k 
 +   --fast              alias for -1 
 +   --best              alias for -9
  
-Les options de cette commande sont :+   If invoked as `bzip2', default action is to compress. 
 +              as `bunzip2',  default action is to decompress. 
 +              as `bzcat', default action is to decompress to stdout. 
 + 
 +   If no file names are given, bzip2 compresses or decompresses 
 +   from standard input to standard output.  You can combine 
 +   short flags, so `-v -4' means the same as -v4 or -4v, &c. 
 +</code> 
 + 
 +Les options de la commande **bunzip2** sont :
  
 <code> <code>
-[root@centos8 ~]# nohup --help +[root@redhat9 ~]# bunzip2 --help 
-Usage: nohup COMMAND [ARG]... +bzip2, a block-sorting file compressor Version 1.0.813-Jul-2019.
-  or:  nohup OPTION +
-Run COMMANDignoring hangup signals.+
  
-      --help     display this help and exit +   usage: bunzip2 [flags and input files in any order]
-      --version  output version information and exit+
  
-If standard input is a terminal, redirect it from an unreadable file. +   -h --help           print this message 
-If standard output is a terminal, append output to 'nohup.out' if possible, +   -d --decompress     force decompression 
-'$HOME/nohup.out' otherwise. +   -z --compress       force compression 
-If standard error is a terminal, redirect it to standard output+   -k --keep           keep (don't delete) input files 
-To save output to FILE, use 'nohup COMMAND > FILE'.+   -f --force          overwrite existing output files 
 +   -t --test           test compressed file integrity 
 +   -c --stdout         output to standard out 
 +   -q --quiet          suppress noncritical error messages 
 +   -v --verbose        be verbose (a 2nd -v gives more) 
 +   -L --license        display software version & license 
 +   -V --version        display software version & license 
 +   -s --small          use less memory (at most 2500k) 
 +   -1 .. -9            set block size to 100k .. 900k 
 +   --fast              alias for -1 
 +   --best              alias for -9
  
-NOTE: your shell may have its own version of nohupwhich usually supersedes +   If invoked as `bzip2'default action is to compress. 
-the version described here.  Please refer to your shell's documentation +              as `bunzip2',  default action is to decompress. 
-for details about the options it supports.+              as `bzcat', default action is to decompress to stdout.
  
-GNU coreutils online help: <https://www.gnu.org/software/coreutils/> +   If no file names are given, bzip2 compresses or decompresses 
-Full documentation at: <https://www.gnu.org/software/coreutils/nohup> +   from standard input to standard output You can combine 
-or available locally via: info '(coreutils) nohup invocation'+   short flags, so `-v -4' means the same as -v4 or -4v, &c.0
 </code> </code>
  
-====1.10 La Commande kill====+===LAB #7 Travailler avec la Commande bzip2===
  
-La commande kill envoie des signaux aux processus. La liste des signaux possibles peut être afficher avec l'option **-l** :+Utilisez **bzip2** pour compresser votre fichier tar :
  
 <code> <code>
-[root@centos8 ~]# kill -l +[root@redhat9 ~]# bzip2 /tmp/test.tar
- 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP +
- 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 +
-11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM +
-16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP +
-21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ +
-26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR +
-31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3 +
-38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8 +
-43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13 +
-48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12 +
-53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7 +
-58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2 +
-63) SIGRTMAX-1 64) SIGRTMAX +
 </code> </code>
  
-<WRAP center round important> +Constatez la taille du fichier **tar.bz2** :
-**Important** - Vous constaterez que chaque signal possède un numéroCes numéros de signaux sont utilisés à la place des options. Par exemple, **-19** à la place de l'option **-stop**. +
-</WRAP>+
  
-Parmi les numéros de signaux les plus utiles on trouve :+<code> 
 +[root@redhat9 ~]# ls -l /tmp | grep test.tar.bz 
 +-rw-r--r--. 1 root root       207 Sep 27 07:57 test.tar.bz2 
 +</code>
  
-^ Numéro ^ Description ^ +<WRAP center round important 60%
-| -1 | Le signal Hang Up est envoyé à tous les enfants d'un processus quand il se termine | +**Important** Notez que le fichier compressé a été créé dans le même répertoire que le fichier source et que le fichier source a disparu. 
-| -2 | Interruption du processus - équivalent à <key>C</key><key>c</key| +</WRAP>
--3 | La même chose que -2 mais avec la génération d'un fichier de déboggage | +
-| -9 | Le signal qui tue un processus brutalement | +
-| -15 | Le signal envoyé par défaut par la commande **kill**. Le processus se termine normalement |+
  
-Les options de cette commande sont :+Décompressez le fichier tar.bz2 :
  
 <code> <code>
-[root@centos8 ~]# help kill +[root@redhat9 ~]# bunzip2 /tmp/test.tar.bz2
-kill: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] +
-    Send a signal to a job. +
-     +
-    Send the processes identified by PID or JOBSPEC the signal named by +
-    SIGSPEC or SIGNUM.  If neither SIGSPEC nor SIGNUM is present, then +
-    SIGTERM is assumed. +
-     +
-    Options: +
-      -s sig SIG is a signal name +
-      -n sig SIG is a signal number +
-      -l list the signal names; if arguments follow `-l' they are +
-    assumed to be signal numbers for which names should be listed +
-      -L synonym for -l +
-     +
-    Kill is a shell builtin for two reasons: it allows job IDs to be used +
-    instead of process IDs, and allows processes to be killed if the limit +
-    on processes that you can create is reached. +
-     +
-    Exit Status: +
-    Returns success unless an invalid option is given or an error occurs.+
 </code> </code>
  
-====1.11 - La Commande pkill====+====La Commande xz====
  
-La commande pkill permet d'envoyer des signaux aux processus identifiés par leur nomPar exemple la commande suivante force syslog de relire son fichier de configuration :+===Présentation=== 
 + 
 +La commande **xz** est un utilitaire de compression sous GNU/Linux. D'autres commandes sont : 
 + 
 +  * **unxz** - équivalent à **xz --decompress**. 
 +  * **xzcat** - équivalent à **xz --decompress --stdout**. 
 +  * **lzma** - équivalent à **xz --format=lzma**. 
 +  * **unlzma** - équivalent à **xz --format=lzma --decompress**. 
 +  * **lzcat** - équivalent à** xz --format=lzma --decompress --stdout**. 
 + 
 +La commande xz ne compressera pas le fichier si : 
 + 
 +  * le fichier n'est pas de type standard 
 +  * le fichier est un lien symbolique 
 +  * le fichier est un lien physique 
 +  * le fichier possède le sticky bit, le SUID bit ou le SGID bit 
 +  * le fichier possède déjà une extension .xz ou .lzma 
 + 
 +La commande xz ne décompressera pas le fichier si : 
 + 
 +  * le fichier ne possède pas d'extension .xz ou .lzma 
 + 
 +===Options des Commandes=== 
 + 
 +Les options de la commande **xz** sont :
  
 <code> <code>
-[root@centos8 ~]# pkill -HUP rsyslogd+[root@redhat9 ~]# xz --help 
 +Usage: xz [OPTION]... [FILE]... 
 +Compress or decompress FILEs in the .xz format. 
 + 
 +  -z, --compress      force compression 
 +  -d, --decompress    force decompression 
 +  -t, --test          test compressed file integrity 
 +  -l, --list          list information about .xz files 
 +  -k, --keep          keep (don't delete) input files 
 +  -f, --force         force overwrite of output file and (de)compress links 
 +  -c, --stdout        write to standard output and don't delete input files 
 +  -0 ... -9           compression preset; default is 6; take compressor *and* 
 +                      decompressor memory usage into account before using 7-9! 
 +  -e, --extreme       try to improve compression ratio by using more CPU time; 
 +                      does not affect decompressor memory requirements 
 +  -T, --threads=NUM   use at most NUM threads; the default is 1; set to 0 
 +                      to use as many threads as there are processor cores 
 +  -q, --quiet         suppress warnings; specify twice to suppress errors too 
 +  -v, --verbose       be verbose; specify twice for even more verbose 
 +  -h, --help          display this short help and exit 
 +  -H, --long-help     display the long help (lists also the advanced options) 
 +  -V, --version       display the version number and exit 
 + 
 +With no FILE, or when FILE is -, read standard input. 
 + 
 +Report bugs to <lasse.collin@tukaani.org> (in English or Finnish). 
 +XZ Utils home page: <https://tukaani.org/xz/>
 </code> </code>
  
-Les options de cette commande sont :+===LAB #8 - Travailler avec la Commande xz=== 
 + 
 +Utilisez **xz** pour compresser votre fichier tar :
  
 <code> <code>
-[root@centos8 ~]# pkill --help+[root@redhat9 ~]# xz /tmp/test.tar 
 +</code>
  
-Usage: +<WRAP center round important 60%> 
- pkill [options] <pattern>+**Important** - Notez que le fonctionnement par défaut de la commande est identique à celui de l'option **-z**.  
 +</WRAP>
  
-Options: +Constatez la présence du fichier **test.tar.xz** :
- -<sig>, --signal <sig>    signal to send (either number or name) +
- -e, --echo                display what is killed +
- -c, --count               count of matching processes +
- -f, --full                use full process name to match +
- -g, --pgroup <PGID,...>   match listed process group IDs +
- -G, --group <GID,...>     match real group IDs +
- -i, --ignore-case         match case insensitively +
- -n, --newest              select most recently started +
- -o, --oldest              select least recently started +
- -P, --parent <PPID,...>   match only child processes of the given parent +
- -s, --session <SID,...>   match session IDs +
- -t, --terminal <tty,...>  match by controlling terminal +
- -u, --euid <ID,...>       match by effective IDs +
- -U, --uid <ID,...>        match by real IDs +
- -x, --exact               match exactly with the command name +
- -F, --pidfile <file>      read PIDs from file +
- -L, --logpidfile          fail if PID file is not locked +
- --ns <PID>                match the processes that belong to the same +
-                           namespace as <pid> +
- --nslist <ns,...>         list which namespaces will be considered for +
-                           the --ns option. +
-                           Available namespacesipc, mnt, net, pid, user, uts+
  
- -h, --help     display this help and exit +<code> 
- -V, --version  output version information and exit+[root@redhat9 ~]# ls -l /tmp | grep test.tar.xz 
 +-rw-r--r--. 1 root root       236 Sep 27 07:57 test.tar.xz 
 +</code>
  
-For more details see pgrep(1).+<WRAP center round important 60%> 
 +**Important** - Notez que le fichier compressé a été créé dans le même répertoire que le fichier source et que le fichier source a disparu. Le fichier source peut être maintenue si l'option **--keep** est spécifiée. Si le fichier test.tar.xz avait déjà existé, la commande aurait échouée avec un message d'erreur. L'extension du fichier est **.xz**, cependant la commande peut aussi gérer l'extension **.lzma**. 
 +</WRAP> 
 + 
 +Décompressez le fichier test.tar.xz : 
 + 
 +<code> 
 +[root@redhat9 ~]# xz -d /tmp/test.tar.xz 
 +[root@redhat9 ~]# ls -l /tmp | grep test 
 +-rw-r--r--. 1 root root       160 Sep 25 16:05 greptest 
 +-rw-r--r--. 1 root root        49 Sep 25 16:05 greptest1 
 +-rw-r--r--. 1 root root    687556 Sep 25 16:08 sedtest 
 +-rw-r--r--. 1 root root       512 Sep 27 08:08 test.cpio 
 +-rw-r--r--. root root     10240 Sep 27 07:57 test.tar
 </code> </code>
 +
 +====Autres Utilitaires====
 +
 +Il existe d'autres utilitaires pour la compression, chacun produisant un fichier ayant une extension spécifique :
 +
 +^ Outil ^ Extension ^ Commande de Compression ^ Commande de Décompression ^
 +| compress | .Z | compress | uncompress |
 +| rar | .rar | rar | unrar |
 +| zip | .zip | zip | unzip |
  
 ----- -----
 Copyright © 2024 Hugh Norris. Copyright © 2024 Hugh Norris.
Menu