Différences

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

Lien vers cette vue comparative

Prochaine révision
Révision précédente
elearning:workbooks:rhel:6:utilisateur:l104 [2020/01/30 03:28] – external edit 127.0.0.1elearning:workbooks:rhel:6:utilisateur:l104 [2023/05/10 16:21] (Version actuelle) admin
Ligne 1: Ligne 1:
-~~PDF:LANDSCAPE~~ 
  
-Last updated on~~LASTMOD~~+Version **2023.01**
  
-======Basic Shell Commands and Text Manipulation Tools======+Last updated : ~~LASTMOD~~
  
-<WRAP center round important 60%>+======LCE404 - Basic Shell Commands and Text Manipulation Tools====== 
 + 
 +=====Contents===== 
 + 
 +  * **LCE404 - Basic Shell Commands and Text Manipulation Tools** 
 +    * Contents 
 +    * LAB #1 - Use of Basic Shell Commands 
 +      * 1.1 - The stty Command 
 +      * 1.2 - The date command 
 +      * 1.3 - The who Command 
 +      * 1.4 - The df Command 
 +      * 1.5 - The free Command 
 +      * 1.6 - The whoami Command 
 +      * 1.7 - The pwd Command 
 +      * 1.8 - The cd Command 
 +      * 1.9 - The ls Command 
 +      * 1.10 - The lsof Command 
 +      * 1.11 - The touch Command 
 +      * 1.12 - The echo Command 
 +      * 1.13 - The cp Command 
 +      * 1.14 - The file Command 
 +      * 1.15 - The cat Command 
 +      * 1.16 - The mv Command 
 +      * 1.17 - The mkdir Command 
 +      * 1.18 - The rmdir Command 
 +      * 1.19 - The rm Command 
 +      * 1.20 - The sort Command 
 +      * 1.21 - The more Command 
 +      * 1.22 - The less Command 
 +      * 1.23 - The find Command 
 +      * 1.24 - The su Command 
 +      * 1.25 - The updatedb and locate Commands 
 +      * 1.26 - The whereis Command 
 +      * 1.27 - The which Command 
 +      * 1.28 - The uptime Command 
 +      * 1.29 - The w Command 
 +      * 1.30 - The uname Command 
 +      * 1.31 - The du Command 
 +      * 1.32 - The clear Command 
 +      * 1.33 - The exit Command 
 +      * 1.34 - The logout Command 
 +      * 1.35 - The sleep Command 
 +      * 1.36 - The wall Command 
 +      * 1.37 - The seq Command 
 +      * 1.38 - The screen Command 
 +    * LAB #2 - Switches and Arguments 
 +    * LAB #3 - Regular Expressions 
 +        * BREs 
 +        * EREs 
 +    * Manipulating Text Files 
 +      * Text-search Utilities 
 +        * The grep Command 
 +        * The egrep Command 
 +        * The fgrep Command 
 +        * LAB #4 - Using grep, egrep and fgrep 
 +      * The Stream EDitor SED 
 +        * LAB #5 - Using sed 
 +      * The Text Processor AWK 
 +        * Presentation 
 +        * Field Separation 
 +        * Conditions 
 +          * A regular expression applied to a record 
 +          * A regular expression applied to a field 
 +          * Comparisons 
 +          * Logical Operators  
 +          * Built-in Variables 
 +        * Awk Scripts 
 +        * The printf function 
 +        * Control Statements 
 +          * if 
 +          * for 
 +          * while 
 +          * do-while 
 +        * LAB #3 - Using awk 
 +    * LAB 7 - Other Useful Commands 
 +      * 7.1 - The expand Command 
 +      * 7.2 - La Commande unexpand 
 +      * 7.3 - The cut command 
 +      * 7.4 - The uniq Command 
 +      * 7.5 - The tr Command 
 +      * 7.6 - The paste Command 
 +      * 7.7 - The split Command 
 +      * 7.8 - The diff Command 
 +      * 7.9 - The cmp Command 
 +      * 7.10 - The patch Command 
 +      * 7.11 - The strings Command 
 +      * 7.12 - The comm Command 
 +      * 7.13 - The head Command 
 +      * 7.14 - The tail Command 
 +    * LAB #8 - Use the grep, tr and cut commands to extract your IPv4 address from the output of ifconfig 
 +    * LAB #9 - Use the grep, awk and sed commands to extract your IPv4 address from the output of ip 
 + 
 +=====LAB #1 - Use of Basic Shell Commands===== 
 + 
 +<WRAP center round todo 60%>
 **To do** - You are currently the root user in your terminal. Before proceeding further, type **exit** and hit the <key>Enter</key> key. **To do** - You are currently the root user in your terminal. Before proceeding further, type **exit** and hit the <key>Enter</key> key.
 </WRAP> </WRAP>
  
-=====Use of Basic Shell Commands===== +====1.1 - The stty Command====
- +
-====The stty Command====+
  
 Using this command with the **-a** switch allows you to identify which combination of keys should be used to control a foreground process: Using this command with the **-a** switch allows you to identify which combination of keys should be used to control a foreground process:
  
 <code> <code>
-[trainee@centos7 ~]$ stty -a +[trainee@centos8 ~]$ stty -a 
-speed 38400 baud; rows 26; columns 80; line = 0;+speed 38400 baud; rows 24; columns 80; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
 eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
-werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;+werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
 -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
--iuclc -ixany -imaxbel -iutf8+-iuclc -ixany -imaxbel iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl echoke+echoctl echoke -flusho -extproc
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-The two most important combinations are **intr = ^C** and **susp = ^Z**. The former kills the process whilst the latter suspends its execution.+**Important** - The two most important combinations are **intr = ^C** and **susp = ^Z**. The former kills the process whilst the latter suspends its execution.
 </WRAP> </WRAP>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **stty** command to view the command line switches. **To do** : Use the **--help** option of the **stty** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The date command====+====1.2 - The date command====
  
 This command's output gives the current system date and time. The command can also be used to set the system date: This command's output gives the current system date and time. The command can also be used to set the system date:
  
 <code> <code>
-[trainee@centos7 ~]$ date +[trainee@centos8 ~]$ date 
-Thu 29 Sep 04:53:58 CEST 2016+Tue 20 Apr 02:27:55 EDT 2021
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **date** command to view the command line switches. **To do** : Use the **--help** option of the **date** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The who Command====+====1.3 - The who Command====
  
 This command's output shows who is currently connected to the system: This command's output shows who is currently connected to the system:
  
 <code> <code>
-[trainee@centos7 ~]$ who +<code> 
-trainee  pts/0        2016-09-28 23:29 (gateway)+[trainee@centos8 ~]$ who 
 +trainee  pts/0        2021-04-20 02:21 (10.0.2.2)
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **who** command to view the command line switches. **To do** : Use the **--help** option of the **who** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The df Command====+====1.4 - The df Command====
  
 This command's output shows the free space on each mounted block device: This command's output shows the free space on each mounted block device:
  
 <code> <code>
-[trainee@centos7 ~]$ df+[trainee@centos8 ~]$ df
 Filesystem     1K-blocks    Used Available Use% Mounted on Filesystem     1K-blocks    Used Available Use% Mounted on
-/dev/sda2       10229760 4274948   5954812  42% / +devtmpfs         1897604       0   1897604   0% /dev 
-devtmpfs          236036       0    236036   0% /dev +tmpfs            1913700       0   1913700   0% /dev/shm 
-tmpfs             250388       0    250388   0% /dev/shm +tmpfs            1913700    8736   1904964   1% /run 
-tmpfs             250388    4716    245672   2% /run +tmpfs            1913700       0   1913700   0% /sys/fs/cgroup 
-tmpfs             250388       0    250388   0% /sys/fs/cgroup +/dev/sda3       15349760 2419808  12929952  16% / 
-tmpfs             250388      72    250316   1% /tmp +/dev/sda1         289285  198275     71554  74% /boot 
-/dev/sda1         201388  201368        20 100% /boot +tmpfs             382740       0    382740   0% /run/user/1000
-tmpfs              50080       0     50080   0% /run/user/1000+
 </code> </code>
  
Ligne 89: Ligne 180:
  
 <code> <code>
-[trainee@centos7 ~]$ df -h+[trainee@centos8 ~]$ df -h
 Filesystem      Size  Used Avail Use% Mounted on Filesystem      Size  Used Avail Use% Mounted on
-/dev/sda2       9.8G  4.1G  5.7G  42% / +devtmpfs        1.9G     0  1.9G   0% /dev 
-devtmpfs        231M     0  231M   0% /dev +tmpfs           1.9G     0  1.9G   0% /dev/shm 
-tmpfs           245M     0  245M   0% /dev/shm +tmpfs           1.9G  8.6M  1.9G   1% /run 
-tmpfs           245M  4.7M  240M   2% /run +tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup 
-tmpfs           245M     0  245M   0% /sys/fs/cgroup +/dev/sda3        15G  2.4G   13G  16% / 
-tmpfs           245M   72K  245M   1% /tmp +/dev/sda1       283M  194M   70M  74% /boot 
-/dev/sda1       197M  197M   20K 100% /boot +tmpfs           374M     0  374M   0% /run/user/1000
-tmpfs            49M     0   49M   0% /run/user/1000+
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **df** command to view the command line switches. **To do** : Use the **--help** option of the **df** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The free Command====+====1.5 - The free Command====
  
 This command's output shows the memory usage: This command's output shows the memory usage:
  
-<code> +[trainee@centos8 ~]$ free
-[trainee@centos7 ~]$ free+
               total        used        free      shared  buff/cache   available               total        used        free      shared  buff/cache   available
-Mem:         500780      192460       11580        3356      296740      245128 +Mem:        3827400      290372     2594252        8736      942776     3281880 
-Swap:       2096124        3852     2092272+Swap:       2047996               2047996
 </code> </code>
  
Ligne 121: Ligne 210:
  
 <code> <code>
-[trainee@centos7 ~]$ free -h+<code> 
 +[trainee@centos8 ~]$ free -h
               total        used        free      shared  buff/cache   available               total        used        free      shared  buff/cache   available
-Mem:           489M        188M         11M        3.3M        289M        239M +Mem:          3.6Gi       283Mi       2.5Gi       8.0Mi       920Mi       3.1Gi 
-Swap:          2.0G        3.8M        2.0G+Swap:         2.0Gi          0B       2.0Gi
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **free** command to view the command line switches. **To do** : Use the **--help** option of the **free** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The whoami Command====+====1.6 - The whoami Command====
  
 This command's output indicates the user name associated with the current effective user ID: This command's output indicates the user name associated with the current effective user ID:
  
 <code> <code>
-[trainee@centos7 ~]$ whoami+[trainee@centos8 ~]$ whoami
 trainee trainee
 </code> </code>
Ligne 145: Ligne 235:
  
 <code> <code>
-[trainee@centos7 ~]$ su -+[trainee@centos8 ~]$ su -
 Password: fenestros Password: fenestros
-Last login: Wed Sep 28 12:08:28 CEST 2016 on pts/0 
 </code> </code>
  
Ligne 157: Ligne 246:
  
 <code> <code>
-[root@centos7 ~]# whoami+[root@centos8 ~]# whoami
 root root
-[root@centos7 ~]#  
 </code> </code>
  
Ligne 169: Ligne 257:
  
 <code> <code>
-[root@centos7 ~]# exit+[root@centos8 ~]# exit
 logout logout
-[trainee@centos7 ~]$ +[trainee@centos8 ~]$ 
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **whoami** command to view the command line switches. **To do** : Use the **--help** option of the **whoami** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The pwd Command====+====1.7 - The pwd Command====
  
 This command's output shows the current working directory: This command's output shows the current working directory:
  
 <code> <code>
-[trainee@centos7 ~]$ pwd+[trainee@centos8 ~]$ pwd
 /home/trainee /home/trainee
 </code> </code>
Ligne 191: Ligne 279:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **help** command with **pwd** option to view the command line switches. **To do** : Use the **help** command with **pwd** option to view the command line switches.
 </WRAP> </WRAP>
  
-====The cd Command===+====1.8 - The cd Command===
  
 This command's output changes the current working directory to that specified by the **argument**: This command's output changes the current working directory to that specified by the **argument**:
  
 <code> <code>
-[trainee@centos7 ~]$ cd /tmp +[trainee@centos8 ~]$ cd /tmp 
-[trainee@centos7 tmp]$ pwd+[trainee@centos8 tmp]$ pwd
 /tmp /tmp
-[trainee@centos7 tmp]$ +[trainee@centos8 tmp]$ 
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **help** command with **cd** option to view the command line switches. **To do** : Use the **help** command with **cd** option to view the command line switches.
 </WRAP> </WRAP>
  
-====The ls Command===+====1.9 - The ls Command===
  
 This commands output lists information about the files in directory specified as an argument. If no argument is specified, the output lists the files in the current working directory:  This commands output lists information about the files in directory specified as an argument. If no argument is specified, the output lists the files in the current working directory: 
  
 <code> <code>
-[trainee@centos7 tmp]$ ls +[trainee@centos8 tmp]$ ls 
-hsperfdata_root  inode  systemd-private-45071248a58f4fd2a4de940a5734c8ec-cups.service-ODc5L6+systemd-private-d9ff2376a8a44f0392f860d80c839be4-chronyd.service-6im4Ii
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **ls** command to view the command line switches. **To do** : Use the **--help** option of the **ls** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The lsof Command====+====1.10 - The lsof Command====
  
 This command's output shows information about open files: This command's output shows information about open files:
  
 <code> <code>
-[trainee@centos7 tmp]$ su -+[trainee@centos8 tmp]$ su -
 Password: fenestros Password: fenestros
-Last login: Thu Sep 29 06:24:28 CEST 2016 on pts/0 +[root@centos8 ~]# lsof | more 
-[root@centos7 ~]# lsof | more +COMMAND     PID   TID TASKCMD             USER   FD      TYPE             DEVICE 
-COMMAND     PID   TID           USER   FD      TYPE             DEVICE  SIZE/OFF       NODE NAME + SIZE/OFF       NODE NAME 
-systemd                       root  cwd       DIR                8,     4096        128 / +systemd                                 root  cwd       DIR                8,
-systemd                       root  rtd       DIR                8,     4096        128 / +      224        128 / 
-systemd                       root  txt       REG                8,2   1494056   33607555 /usr/lib/systemd/systemd +systemd                                 root  rtd       DIR                8,
-systemd                       root  mem       REG                8,2     20032   17241167 /usr/lib64/libuuid.so.1.3.0 +      224        128 / 
-systemd                       root  mem       REG                8,2    252696   20114965 /usr/lib64/libblkid.so.1.1.0 +systemd                                 root  txt       REG                8,3 
-systemd       1                 root  mem       REG                8,2     90632   18751025 /usr/lib64/libz.so.1.2.7 +  1609248    8811152 /usr/lib/systemd/systemd 
-systemd                       root  mem       REG                8,2     19888   17326380 /usr/lib64/libattr.so.1.1.0 +systemd                                 root  mem       REG                8,3 
-systemd                       root  mem       REG                8,2     19520   17239651 /usr/lib64/libdl-2.17.so +  2191808     126296 /usr/lib64/libm-2.28.so 
-systemd                       root  mem       REG                8,2    153192   18023397 /usr/lib64/liblzma.so.5.0.99 +systemd                                 root  mem       REG                8,3 
-systemd                       root  mem       REG                8,2    398272   18105157 /usr/lib64/libpcre.so.1.2.0 +   628744     126019 /usr/lib64/libudev.so.1.6.11 
-systemd                       root  mem       REG                8,2   2107816   17239525 /usr/lib64/libc-2.17.so +systemd                                 root  mem       REG                8,3 
-systemd                       root  mem       REG                8,2    142304   17240882 /usr/lib64/libpthread-2.17.so +   969832     151279 /usr/lib64/libsepol.so.1 
-systemd                       root  mem       REG                8,2     88720   17511831 /usr/lib64/libgcc_s-4.8.5-20150702.so.1 +systemd                                 root  mem       REG                8,3 
-systemd                       root  mem       REG                8,2     44096   17241011 /usr/lib64/librt-2.17.so +  1805368     179753 /usr/lib64/libunistring.so.2.1.0 
-systemd                       root  mem       REG                8,2    260784   20114966 /usr/lib64/libmount.so.1.1.0 +systemd                                 root  mem       REG                8,
-systemd                       root  mem       REG                8,    91768   18023376 /usr/lib64/libkmod.so.2.2.10 +   303944     131440 /usr/lib64/libpcap.so.1.9.1 
-systemd                       root  mem       REG                8,2    118792   17326381 /usr/lib64/libaudit.so.1.0.0 +systemd                                 root  mem       REG                8,
-systemd                       root  mem       REG                8,    61648   18105139 /usr/lib64/libpam.so.0.83.1 +   145984     163438 /usr/lib64/libgpg-error.so.0.24.2 
-systemd                       root  mem       REG                8,2     20024   17326423 /usr/lib64/libcap.so.2.22 +systemd                                 root  mem       REG                8,3 
-systemd                       root  mem       REG                8,2    147120   18447456 /usr/lib64/libselinux.so.+    71528     194381 /usr/lib64/libjson-c.so.4.0.0 
-systemd                       root  mem       REG                8,2    164440   21744303 /usr/lib64/ld-2.17.so +systemd                                 root  mem       REG                8,3
-systemd                       root  mem       REG                8,2   1333123   50334524 /etc/selinux/targeted/contexts/files/file_contexts.bin+
 --More-- --More--
 </code> </code>
Ligne 264: Ligne 351:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **lsof** command to view the command line switches. **To do** : Use the **--help** option of the **lsof** command to view the command line switches.
 </WRAP> </WRAP>
  
-==== The touch Command====+====1.11 - The touch Command====
  
 This command updates the access and modification times of one or several file(s) to the current time. If the file does not exist, the system creates an empty file: This command updates the access and modification times of one or several file(s) to the current time. If the file does not exist, the system creates an empty file:
  
 <code> <code>
-[root@centos7 ~]# exit+[root@centos8 ~]# exit
 logout logout
-[trainee@centos7 tmp]$ touch test +[trainee@centos8 tmp]$ touch test 
-[trainee@centos7 tmp]$ ls +[trainee@centos8 tmp]$ ls 
-hsperfdata_root  systemd-private-45071248a58f4fd2a4de940a5734c8ec-cups.service-ODc5L6 +systemd-private-d9ff2376a8a44f0392f860d80c839be4-chronyd.service-6im4Ii  test
-inode            test+
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **touch** command to view the command line switches. **To do** : Use the **--help** option of the **touch** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The echo Command ====+====1.12 - The echo Command ====
  
 This command writes the arguments to the standard output (i.e. the screen): This command writes the arguments to the standard output (i.e. the screen):
  
 <code> <code>
-[trainee@centos7 tmp]$ echo fenestros+[trainee@centos8 tmp]$ echo fenestros
 fenestros fenestros
 </code> </code>
Ligne 298: Ligne 384:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **help** command with **echo** option to view the command line switches. **To do** : Use the **help** command with **echo** option to view the command line switches.
 </WRAP> </WRAP>
  
-====The cp Command===+====1.13 - The cp Command===
  
 This command is used to copy a source to a destination or multiple sources to a directory: This command is used to copy a source to a destination or multiple sources to a directory:
  
 <code> <code>
-[trainee@centos7 tmp]$ cp test ~ +[trainee@centos8 tmp]$ cp test ~ 
-[trainee@centos7 tmp]$ ls -l ~ +[trainee@centos8 tmp]$ ls -l ~ 
-total +total 0 
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Desktop +-rw-rw-r--. 1 trainee trainee 0 Apr 20 03:36 test
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Documents +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Downloads +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Music +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Pictures +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Public +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Templates +
--rw-rw-r--. 1 trainee trainee   Sep 29 17:23 test +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Videos +
--rw-rw-r--. 1 trainee trainee 442 Sep 29 00:53 vitext+
 </code> </code>
  
Ligne 328: Ligne 405:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **cp** command to view the command line switches. **To do** : Use the **--help** option of the **cp** command to view the command line switches.
 </WRAP> </WRAP>
  
-==== The file Command====+====1.14 - The file Command====
  
 This command determines a file type: This command determines a file type:
  
 <code> <code>
-[trainee@centos7 tmp]$ file ~/test+[trainee@centos8 tmp]$ file ~/test
 /home/trainee/test: empty /home/trainee/test: empty
 </code> </code>
Ligne 348: Ligne 425:
  
 <code> <code>
-[trainee@centos7 tmp]$ echo "fenestros" > ~/test+[trainee@centos8 tmp]$ echo "fenestros" > ~/test
 </code> </code>
  
Ligne 354: Ligne 431:
  
 <code> <code>
-[trainee@centos7 tmp]$ file ~/test+[trainee@centos8 tmp]$ file ~/test
 /home/trainee/test: ASCII text /home/trainee/test: ASCII text
 </code> </code>
Ligne 360: Ligne 437:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **file** command to view the command line switches. **To do** : Use the **--help** option of the **file** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The cat Command====+====1.15 - The cat Command====
  
 This commands concatenate files, or standard input, to standard output. In the case of only one file as an argument, the effective result is to print the file contents to the screen: This commands concatenate files, or standard input, to standard output. In the case of only one file as an argument, the effective result is to print the file contents to the screen:
  
 <code> <code>
-[trainee@centos7 tmp]$ cat ~/test+[trainee@centos8 tmp]$ cat ~/test
 fenestros fenestros
 </code> </code>
Ligne 375: Ligne 452:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **cat** command to view the command line switches. **To do** : Use the **--help** option of the **cat** command to view the command line switches.
 </WRAP> </WRAP>
  
-==== The mv Command====+====1.16 - The mv Command====
  
 This command renames a source to a destination or moves sources to a directory: This command renames a source to a destination or moves sources to a directory:
  
 <code> <code>
-[trainee@centos7 tmp]$ mv ~/test . +[trainee@centos8 tmp]$ mv ~/test . 
-[trainee@centos7 tmp]$ ls -l ~+[trainee@centos8 tmp]$ ls -l ~ 
 +total 0 
 +[trainee@centos8 tmp]$ mv test TeSt 
 +[trainee@centos8 tmp]$ ls -l
 total 4 total 4
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Desktop +drwx------. root    root    17 Apr 19 12:05 systemd-private-d9ff2376a8a44f0392f860d80c839be4-chronyd.service-6im4Ii 
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Documents +-rw-rw-r--. 1 trainee trainee 10 Apr 20 03:38 TeSt
-drwxr-xr-x2 trainee trainee   6 Apr 30 11:54 Downloads +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Music +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Pictures +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Public +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Templates +
-drwxr-xr-x. 2 trainee trainee   6 Apr 30 11:54 Videos +
--rw-rw-r--. 1 trainee trainee 442 Sep 29 00:53 vitext +
-[trainee@centos7 tmp]$ mv test TeSt +
-[trainee@centos7 tmp]$ ls -l +
-total 4 +
-drwxr-xr-x. 2 root    root     80 Sep 28 10:52 hsperfdata_root +
-drwxr-xr-x. 2 root    root    100 Sep 28 12:30 inode +
-drwx------. 3 root    root     60 Sep 28 10:49 systemd-private-45071248a58f4fd2a4de940a5734c8ec-cups.service-ODc5L6 +
--rw-rw-r--. 1 trainee trainee  10 Sep 29 17:28 TeSt+
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-Note the use of the shortcut **.** which indicates the current working directory.+**Important** - Note the use of the shortcut **.** which indicates the current working directory.
 </WRAP> </WRAP>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **mv** command to view the command line switches. **To do** : Use the **--help** option of the **mv** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The mkdir Command====+====1.17 - The mkdir Command====
  
 This command creates the directory(ies) if it (they) does (do) not exist: This command creates the directory(ies) if it (they) does (do) not exist:
  
 <code> <code>
-[trainee@centos7 tmp]$ cd ~ +[trainee@centos8 tmp]$ cd ~ 
-[trainee@centos7 ~]$ mkdir testdir +[trainee@centos8 ~]$ mkdir testdir 
-[trainee@centos7 ~]$ ls +[trainee@centos8 ~]$ ls 
-Desktop  Documents  Downloads  Music  Pictures  Public  Templates  testdir  Videos  vitext+testdir
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **mkdir** command to view the command line switches. **To do** : Use the **--help** option of the **mkdir** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The rmdir Command====+====1.18 - The rmdir Command====
  
 This command removes the directory(ies) if it (they) is (are) **empty**: This command removes the directory(ies) if it (they) is (are) **empty**:
  
 <code> <code>
-[trainee@centos7 ~]$ rmdir testdir +[trainee@centos8 ~]$ rmdir testdir 
-[trainee@centos7 ~]$ ls +[trainee@centos8 ~]$ ls 
-Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos  vitext+[trainee@centos8 ~]$ 
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **rmdir** command to view the command line switches. **To do** : Use the **--help** option of the **rmdir** command to view the command line switches.
 </WRAP> </WRAP>
  
-==== The rm Command====+====1.19 - The rm Command====
  
 This command removes a directory, empty of not, as well as files: This command removes a directory, empty of not, as well as files:
  
 <code> <code>
-[trainee@centos7 ~]$ mkdir testdir1 +[trainee@centos8 ~]$ mkdir testdir1 
-[trainee@centos7 ~]$ cd /tmp +[trainee@centos8 ~]$ cd /tmp 
-[trainee@centos7 tmp]$ echo "fenestros" > TeSt +[trainee@centos8 tmp]$ echo "fenestros" > TeSt 
-[trainee@centos7 tmp]$ cd ~ +[trainee@centos8 tmp]$ cd ~ 
-[trainee@centos7 ~]$ mv /tmp/TeSt ~/testdir1 +[trainee@centos8 ~]$ mv /tmp/TeSt ~/testdir1 
-[trainee@centos7 ~]$ ls -lR testdir1/+[trainee@centos8 ~]$ ls -lR testdir1/
 testdir1/: testdir1/:
 total 4 total 4
--rw-rw-r--. 1 trainee trainee 10 Sep 29 18:13 TeSt +-rw-rw-r--. 1 trainee trainee 10 Apr 20 03:44 TeSt 
-[trainee@centos7 ~]$ rmdir testdir1/ +[trainee@centos8 ~]$ rmdir testdir1/ 
-rmdir: failed to remove testdir1/: Directory not empty +rmdir: failed to remove 'testdir1/': Directory not empty 
-[trainee@centos7 ~]$ rm -rf testdir1/ +[trainee@centos8 ~]$ rm -rf testdir1/ 
-[trainee@centos7 ~]$ ls +[trainee@centos8 ~]$ ls 
-Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos  vitext+[trainee@centos8 ~]$ 
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **rm** command to view the command line switches. **To do** : Use the **--help** option of the **rm** command to view the command line switches.
 </WRAP> </WRAP>
  
-==== The sort Command ====+====1.20 - The sort Command ====
  
 This command writes a sorted concatenation of all files to standard output: This command writes a sorted concatenation of all files to standard output:
  
 <code> <code>
-[trainee@centos7 ~]$ touch aac abc bca xyz +[trainee@centos8 ~]$ touch aac abc bca xyz 
-[trainee@centos7 ~]$ ls +[trainee@centos8 ~]$ ls 
-aac  bca      Documents  Music     Public     Videos  xyz +aac  abc  bca  xyz 
-abc  Desktop  Downloads  Pictures  Templates  vitext +[trainee@centos8 ~]$ ls | sort
-[trainee@centos7 ~]$ ls | sort+
 aac aac
 abc abc
 bca bca
-Desktop 
-Documents 
-Downloads 
-Music 
-Pictures 
-Public 
-Templates 
-Videos 
-vitext 
 xyz xyz
-[trainee@centos7 ~]$ ls | sort -r+[trainee@centos8 ~]$ ls | sort -r
 xyz xyz
-vitext 
-Videos 
-Templates 
-Public 
-Pictures 
-Music 
-Downloads 
-Documents 
-Desktop 
 bca bca
 abc abc
Ligne 520: Ligne 567:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **sort** command to view the command line switches. **To do** : Use the **--help** option of the **sort** command to view the command line switches.
 </WRAP> </WRAP>
  
-==== The more Command ====+====1.21 - The more Command ====
  
 This command is used to display a long file page by page: This command is used to display a long file page by page:
  
 <code> <code>
-[trainee@centos7 ~]$ more /etc/services+[trainee@centos8 ~]$ more /etc/services
 # /etc/services: # /etc/services:
-# $Id: services,v 1.55 2013/04/14 ovasik Exp $+# $Id: services,v 1.49 2017/08/18 12:43:23 ovasik Exp $
 # #
 # Network services, Internet style # Network services, Internet style
-# IANA services version: last updated 2013-04-10+# IANA services version: last updated 2016-07-08
 # #
 # Note that it is presently the policy of IANA to assign a single well-known # Note that it is presently the policy of IANA to assign a single well-known
Ligne 562: Ligne 609:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **more** command to view the command line switches. **To do** : Use the **--help** option of the **more** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The less Command====+====1.22 - The less Command====
  
 The **less** command produces a similar result to that of the **more** command. Practice using the less command and refer to the help using **less --help**. Which command seems the most powerful and versatile ? The **less** command produces a similar result to that of the **more** command. Practice using the less command and refer to the help using **less --help**. Which command seems the most powerful and versatile ?
  
 <code> <code>
-[trainee@centos7 ~]$ less /etc/services+[trainee@centos8 ~]$ less /etc/services
 # /etc/services: # /etc/services:
-# $Id: services,v 1.55 2013/04/14 ovasik Exp $+# $Id: services,v 1.49 2017/08/18 12:43:23 ovasik Exp $
 # #
 # Network services, Internet style # Network services, Internet style
-# IANA services version: last updated 2013-04-10+# IANA services version: last updated 2016-07-08
 # #
 # Note that it is presently the policy of IANA to assign a single well-known # Note that it is presently the policy of IANA to assign a single well-known
Ligne 600: Ligne 647:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **less** command to view the command line switches. **To do** : Use the **--help** option of the **less** command to view the command line switches.
 </WRAP> </WRAP>
    
-====The find Command===+====1.23 - The find Command===
  
 This command is used to search for a specific file or directory. The default path is the **current directory** and default expression is **-print**:  This command is used to search for a specific file or directory. The default path is the **current directory** and default expression is **-print**: 
  
 <code> <code>
-[trainee@centos7 ~]$ find acc+[trainee@centos8 ~]$ find acc
 find: ‘acc’: No such file or directory find: ‘acc’: No such file or directory
-[trainee@centos7 ~]$ find aac+[trainee@centos8 ~]$ find aac
 aac aac
 </code> </code>
Ligne 621: Ligne 668:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **find** command to view the command line switches. **To do** : Use the **--help** option of the **find** command to view the command line switches.
 </WRAP> </WRAP>
    
-====The su Command===+====1.24 - The su Command===
  
 This command is used to change the effective user id and group id to that of the user passed as an argument. When executed with no argument, the system assumes the destination user is **root**: This command is used to change the effective user id and group id to that of the user passed as an argument. When executed with no argument, the system assumes the destination user is **root**:
  
 <code> <code>
-[trainee@centos7 ~]$ su -+[trainee@centos8 ~]$ su -
 Password: fenestros Password: fenestros
-Last login: Thu Sep 29 17:08:56 CEST 2016 on pts/0+[root@centos8 ~]# 
 </code> </code>
  
Ligne 641: Ligne 688:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **su** command to view the command line switches. **To do** : Use the **--help** option of the **su** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The updatedb and locate Commands====+====1.25 - The updatedb and locate Commands====
  
 The **locate** command is used to list files in databases that match a pattern supplied as an argument to the command. The **locate** command uses a database. This database needs to be created using the **updatedb** command before using the **locate** command.  The **locate** command is used to list files in databases that match a pattern supplied as an argument to the command. The **locate** command uses a database. This database needs to be created using the **updatedb** command before using the **locate** command. 
Ligne 652: Ligne 699:
  
 <code> <code>
-[root@centos7 ~]# ls -l /var/lib/mlocate/mlocate.db +[root@centos8 ~]# ls -l /var/lib/mlocate/mlocate.db 
--rw-r-----. 1 root slocate 3887117 Sep 29 03:46 /var/lib/mlocate/mlocate.db+-rw-r-----. 1 root slocate 1652822 Apr 20 03:52 /var/lib/mlocate/mlocate.db
 </code> </code>
  
Ligne 663: Ligne 710:
  
 <code> <code>
-[root@centos7 ~]# cat /etc/updatedb.conf+[root@centos8 ~]# cat /etc/updatedb.conf
 PRUNE_BIND_MOUNTS = "yes" PRUNE_BIND_MOUNTS = "yes"
-PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda configfs cpuset debugfs devpts ecryptfs exofs fuse fuse.sshfs fusectl gfs gfs2 hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc ramfs rootfs rpc_pipefs securityfs selinuxfs sfs sockfs sysfs tmpfs ubifs udf usbfs" +PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda configfs cpuset debugfs devpts ecryptfs exofs fuse fuse.sshfs fusectl gfs gfs2 gpfs hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc ramfs rootfs rpc_pipefs securityfs selinuxfs sfs sockfs sysfs tmpfs ubifs udf usbfs ceph fuse.ceph
-PRUNENAMES = ".git .hg .svn" +PRUNENAMES = ".git .hg .svn .bzr .arch-ids {arch} CVS
-PRUNEPATHS = "/afs /media /mnt /net /sfs /tmp /udev /var/cache/ccache /var/lib/yum/yumdb /var/spool/cups /var/spool/squid /var/tmp"+PRUNEPATHS = "/afs /media /mnt /net /sfs /tmp /udev /var/cache/ccache /var/lib/yum/yumdb /var/lib/dnf/yumdb /var/spool/cups /var/spool/squid /var/tmp /var/lib/ceph"
 </code> </code>
  
Ligne 673: Ligne 720:
  
 <code> <code>
-[root@centos7 ~]# updatedb +[root@centos8 ~]# updatedb 
-[root@centos7 ~]# locate aac+[root@centos8 ~]# locate aac
 /home/trainee/aac /home/trainee/aac
-/usr/lib/modules/3.10.0-327.13.1.el7.x86_64/kernel/drivers/scsi/aacraid +/usr/lib/.build-id/10/3879896070484de2e0eaac453ec43579fbb8e2 
-/usr/lib/modules/3.10.0-327.13.1.el7.x86_64/kernel/drivers/scsi/aacraid/aacraid.ko +/usr/lib/.build-id/22/e20bcaaca5ed745d4f5f319ce3cc15e0db8d56 
-/usr/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/scsi/aacraid +/usr/lib/.build-id/32/ec211a3c0121b5439deba3d4d1fb4e9bf97aac 
-/usr/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/scsi/aacraid/aacraid.ko +/usr/lib/.build-id/45/bdf33b3fef84664d179d00e997daac1648973b 
-/usr/lib/python2.7/site-packages/ipalib/plugins/caacl.py +/usr/lib/.build-id/4c/5a4eaaca9035bbc2fbf200bd71eda505b568f2 
-/usr/lib/python2.7/site-packages/ipalib/plugins/caacl.pyc +/usr/lib/.build-id/55/2e764cb2c3aaacaeec1027b10ce22fb78a5896 
-/usr/lib/python2.7/site-packages/ipalib/plugins/caacl.pyo +/usr/lib/.build-id/55/769aac2caf22de496d9a08e5438d600ff92d6f 
-/usr/share/gtk-doc/html/gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-aacparse.html +/usr/lib/.build-id/55/e2c36fd33cb232e58642c962aac3eeac1168be 
-/usr/share/gupnp-dlna-2.0/dlna-profiles/aac.xml+/usr/lib/.build-id/65/33988a76dd4aac6840cc9d04ae13ac39869b13 
 +/usr/lib/.build-id/79/dc2cf8dc9bd9617d5e897faac79f7458856f19 
 +/usr/lib/.build-id/7e/ec6d530511aac280c13786861e4ec2c04321d9 
 +/usr/lib/.build-id/8a/f8d384f0b01b7bd13a3aac719f738051e20351 
 +/usr/lib/.build-id/8f/0de63d065be5aac7c552cce9412c25e0fa1e3a 
 +/usr/lib/.build-id/93/8ee8bf115b7e98e9b83a68d8a679cd4a7b0aac 
 +/usr/lib/.build-id/9a/635a7bcba89b0280c2198ea30d02faaacaac48 
 +/usr/lib/.build-id/ac/8c79a966aacb69715f0fb388949dfc48ae88c8 
 +/usr/lib/.build-id/b0/14a927cc892e6c5a8faaca7396a5a1c544f599 
 +/usr/lib/.build-id/b2/cee7e58576f3167aacb613906c9790c5bcd266 
 +/usr/lib/.build-id/ea/6926b2fcdbc231b6aa7511c568de704aac79b6 
 +/usr/lib/.build-id/f1/b2efd3d36aecaac279b4a77d00657356b2585f 
 +/usr/lib/.build-id/fc/7d382132889a539aac9cd499f1a2b56855bd95 
 +/usr/lib/modules/4.18.0-147.8.1.el8_1.x86_64/kernel/drivers/scsi/aacraid 
 +/usr/lib/modules/4.18.0-147.8.1.el8_1.x86_64/kernel/drivers/scsi/aacraid/aacraid.ko.xz 
 +/usr/lib/modules/4.18.0-240.22.1.el8_3.x86_64/kernel/drivers/scsi/aacraid 
 +/usr/lib/modules/4.18.0-240.22.1.el8_3.x86_64/kernel/drivers/scsi/aacraid/aacraid.ko.xz
 /usr/share/mime/audio/aac.xml /usr/share/mime/audio/aac.xml
-/usr/src/kernels/3.10.0-327.13.1.el7.x86_64/drivers/scsi/aacraid 
-/usr/src/kernels/3.10.0-327.13.1.el7.x86_64/drivers/scsi/aacraid/Makefile 
-/usr/src/kernels/3.10.0-327.13.1.el7.x86_64/include/config/scsi/aacraid.h 
-/usr/src/kernels/3.10.0-327.el7.x86_64/drivers/scsi/aacraid 
-/usr/src/kernels/3.10.0-327.el7.x86_64/drivers/scsi/aacraid/Makefile 
-/usr/src/kernels/3.10.0-327.el7.x86_64/include/config/scsi/aacraid.h 
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **updatedb** and **locate** commands to view their command line switches. **To do** : Use the **--help** option of the **updatedb** and **locate** commands to view their command line switches.
 </WRAP> </WRAP>
  
-==== The whereis Command===+==== 1.26 - The whereis Command===
  
 This command is used to show the full paths of the executable, the configuration files and the manuals associated with the argument:  This command is used to show the full paths of the executable, the configuration files and the manuals associated with the argument: 
  
 <code> <code>
-[root@centos7 ~]# whereis passwd+[root@centos8 ~]# whereis passwd
 passwd: /usr/bin/passwd /etc/passwd /usr/share/man/man1/passwd.1.gz /usr/share/man/man5/passwd.5.gz passwd: /usr/bin/passwd /etc/passwd /usr/share/man/man1/passwd.1.gz /usr/share/man/man5/passwd.5.gz
 </code> </code>
Ligne 711: Ligne 768:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **whereis** command to view the command line switches. **To do** : Use the **--help** option of the **whereis** command to view the command line switches.
 </WRAP> </WRAP>
  
-==== The which Command====+==== 1.27 - The which Command====
  
 This command searches the PATH variable and returns to standard output the first full path associated with the argument: This command searches the PATH variable and returns to standard output the first full path associated with the argument:
  
 <code> <code>
-[root@centos7 ~]# which passwd +[root@centos8 ~]# which passwd 
-/bin/passwd+/usr/bin/passwd
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **which** command to view the command line switches. **To do** : Use the **--help** option of the **which** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The uptime Command====+====1.28 - The uptime Command====
  
 This command prints to standard output the current time, the length of time the system has been up, the number of users on the system and the average number of jobs in the run queue over the last 1, 5 and 15 minutes: This command prints to standard output the current time, the length of time the system has been up, the number of users on the system and the average number of jobs in the run queue over the last 1, 5 and 15 minutes:
  
 <code> <code>
-[root@centos7 ~]# uptime +[root@centos8 ~]# uptime 
- 19:18:57 up 1 day,  8:30,  1 user,  load average: 0.10, 0.09, 0.07+ 03:55:13 up 15:50,  1 user,  load average: 0.01, 0.00, 0.00
 </code> </code>
  
Ligne 743: Ligne 800:
 The switches associated with this command are: The switches associated with this command are:
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **uptime** command to view the command line switches. **To do** : Use the **--help** option of the **uptime** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The w Command====+====1.29 - The w Command====
  
 This command outputs the same data as the **uptime** command on the first line and then complements this information with the details of each user connected to the system, including what each user is currently doing. This is the replacement under Linux for the Unix command **whodo**: This command outputs the same data as the **uptime** command on the first line and then complements this information with the details of each user connected to the system, including what each user is currently doing. This is the replacement under Linux for the Unix command **whodo**:
  
 <code> <code>
-[root@centos7 ~]# w +[root@centos8 ~]# w 
- 19:28:55 up 1 day,  8:40,  1 user,  load average: 0.00, 0.01, 0.05+ 03:55:16 up 15:50,  1 user,  load average: 0.01, 0.00, 0.00
 USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
-trainee  pts/0    gateway          15:22    7.00s  0.16s  0.12s sshd: trainee [priv]+trainee  pts/0    10.0.2.2         02:21    4.00s  0.16s  0.01s sshd: trainee [priv]
 </code> </code>
  
Ligne 764: Ligne 821:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **w** command to view the command line switches. **To do** : Use the **--help** option of the **w** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The uname Command====+====1.30 - The uname Command====
  
 This command prints system information to the standard output: This command prints system information to the standard output:
  
 <code> <code>
-[root@centos7 ~]# uname -a +[root@centos8 ~]# uname -a 
-Linux centos7.fenestros.loc 3.10.0-327.13.1.el7.x86_64 #1 SMP Thu Mar 31 16:04:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux +Linux centos8.ittraining.loc 4.18.0-240.22.1.el8_3.x86_64 #1 SMP Thu Apr 8 19:01:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux 
-[root@centos7 ~]# uname -s+[root@centos8 ~]# uname -s
 Linux Linux
-[root@centos7 ~]# uname -n +[root@centos8 ~]# uname -n 
-centos7.fenestros.loc +centos8.ittraining.loc 
-[root@centos7 ~]# uname -r +[root@centos8 ~]# uname -r 
-3.10.0-327.13.1.el7.x86_64 +4.18.0-240.22.1.el8_3.x86_64 
-[root@centos7 ~]# uname -v +[root@centos8 ~]# uname -v 
-#1 SMP Thu Mar 31 16:04:38 UTC 2016 +#1 SMP Thu Apr 8 19:01:30 UTC 2021 
-[root@centos7 ~]# uname -m+[root@centos8 ~]# uname -m
 x86_64 x86_64
-[root@centos7 ~]# uname -p+[root@centos8 ~]# uname -p
 x86_64 x86_64
-[root@centos7 ~]# uname -i+[root@centos8 ~]# uname -i
 x86_64 x86_64
-[root@centos7 ~]# uname -o+[root@centos8 ~]# uname -o
 GNU/Linux GNU/Linux
 </code> </code>
Ligne 795: Ligne 852:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **uname** command to view the command line switches. **To do** : Use the **--help** option of the **uname** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The du Command====+====1.31 - The du Command====
  
 This command summarizes disk usage of each file, recursively for directories: This command summarizes disk usage of each file, recursively for directories:
  
 <code> <code>
-[root@centos7 ~]# du -sh /* 2>/dev/null+[root@centos8 ~]# du -sh /* 2>/dev/null
 0 /bin 0 /bin
-187M /boot+192M /boot
 0 /dev 0 /dev
-33M /etc +23M /etc 
-20M /home+16K /home
 0 /lib 0 /lib
 0 /lib64 0 /lib64
-0 /lost+found 
 0 /media 0 /media
 0 /mnt 0 /mnt
-173M /opt+0 /opt
 0 /proc 0 /proc
-43M /root +32K /root 
-8.7M /run+8.6M /run
 0 /sbin 0 /sbin
 0 /srv 0 /srv
 0 /sys 0 /sys
-64K /tmp +0 /tmp 
-3.6G /usr +1.9G /usr 
-228M /var+211M /var
 </code> </code>
  
Ligne 833: Ligne 889:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **du** command to view the command line switches. **To do** : Use the **--help** option of the **du** command to view the command line switches.
 </WRAP> </WRAP>
  
-==== The clear Command ====+==== 1.32 - The clear Command ====
  
 This command is used to clear the current screen of the terminal: This command is used to clear the current screen of the terminal:
  
 <code> <code>
-[root@centos7 ~]# clear+[root@centos8 ~]# clear
  
-[root@centos7 ~]# +[root@centos8 ~]# 
 </code> </code>
  
-==== The exit Command ====+==== 1.33 - The exit Command ====
  
 This command exits the current shell: This command exits the current shell:
  
 <code> <code>
-[root@centos7 ~]# exit +[root@centos8 ~]# exit 
-logou +logout 
-[trainee@centos7 ~]$ +[trainee@centos8 ~]$  
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **help** command with **exit** option to view the command line switches. **To do** : Use the **help** command with **exit** option to view the command line switches.
 </WRAP> </WRAP>
  
-====The logout Command====+====1.34 - The logout Command====
  
 This command logs out a user from a login shell writing the utmp and wtmp entries in the log files. This command logs out a user from a login shell writing the utmp and wtmp entries in the log files.
Ligne 869: Ligne 925:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **help** command with **logout** option to view the command line switches. **To do** : Use the **help** command with **logout** option to view the command line switches.
 </WRAP> </WRAP>
  
-====The sleep Command ====+====1.35 - The sleep Command ====
  
 This command pauses for a number seconds. The number is specified as the first argument. This command pauses for a number seconds. The number is specified as the first argument.
 +
 +<code>
 +[trainee@centos8 ~]$ sleep 10
 +
 +</code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **sleep** command to view the command line switches. **To do** : Use the **--help** option of the **sleep** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The wall Command====+====1.36 - The wall Command====
  
 Wall sends a message to everybody logged in with their mesg(1) permission set to yes. The message can be given as an argument to wall, or it can be sent to wall's standard input.  When using the standard input from a terminal, the message should be terminated with the EOF key (usually Control-D). The length of the message is limited to 20 lines. For every invocation of wall a notification will be written to syslog, with facility LOG_USER and level LOG_INFO. Wall sends a message to everybody logged in with their mesg(1) permission set to yes. The message can be given as an argument to wall, or it can be sent to wall's standard input.  When using the standard input from a terminal, the message should be terminated with the EOF key (usually Control-D). The length of the message is limited to 20 lines. For every invocation of wall a notification will be written to syslog, with facility LOG_USER and level LOG_INFO.
Ligne 890: Ligne 951:
  
 <code> <code>
-[root@centos7 ~]# wall this is a message from root +[trainee@centos8 ~]$ su - 
-[root@centos7 ~]#  +Password:  
-Broadcast message from root@centos7.fenestros.loc (pts/0) (Fri Sep 30 05:35:26 2016)+[root@centos8 ~]# wall this is a message from root 
 +                                                                                
 +Broadcast message from trainee@centos8.ittraining.loc (pts/0) (Tue Apr 20 04:11 
 +                                                                               
 this is a message from root this is a message from root
-[Enter] +                                                                                
-[root@centos7 ~]# +[root@centos8 ~]#
 </code> </code>
  
Ligne 902: Ligne 965:
  
 <code> <code>
-[trainee@centos7 ~]$  +Activate the web console with: systemctl enable --now cockpit.socket
-Broadcast message from root@centos7.fenestros.loc (pts/0) (Fri Sep 30 05:35:26 2016):+
  
-this is a message from root                                                                             +Last login: Tue Apr 20 02:21:15 2021 from 10.0.2.2 
 +                                                                                
 +Broadcast message from trainee@centos8.ittraining.loc (pts/0) (Tue Apr 20 04:11 
 +                                                                                
 +this is a message from root 
 +[Enter]                                                                        
 +[trainee@centos8 ~]$  
 +                                                                           
 </code> </code>
  
-Now look at the end of the**/var/log/messages** file :+La commande wall ignore la variable d’environnement TZ. L’heure affichée dans la première page est basée sur les paramètres de régionalisation du système :
  
 <code> <code>
-[root@centos7 ~]# tail /var/log/messages +[root@centos8 ~]# date 
-Sep 30 05:31:08 centos7 sh: Sleeping '' '' +Tue Apr 20 04:23:19 EDT 2021
-Sep 30 05:34:16 centos7 sh: Sleeping '' '' +
-Sep 30 05:35:13 centos7 systemd: Started Session 311 of user trainee. +
-Sep 30 05:35:13 centos7 systemd-logind: New session 311 of user trainee. +
-Sep 30 05:35:13 centos7 systemd: Starting Session 311 of user trainee. +
-Sep 30 05:35:13 centos7 dbus[515]: [system] Activating service name='org.freedesktop.problems' (using servicehelper) +
-Sep 30 05:35:13 centos7 dbus-daemon: dbus[515]: [system] Activating service name='org.freedesktop.problems' (using servicehelper) +
-Sep 30 05:35:13 centos7 dbus[515]: [system] Successfully activated service 'org.freedesktop.problems' +
-Sep 30 05:35:13 centos7 dbus-daemon: dbus[515]: [system] Successfully activated service 'org.freedesktop.problems' +
-Sep 30 05:35:26 centos7 wall[27550]: wall: user root broadcasted 1 lines (29 chars)+
 </code> </code>
  
-<WRAP center round important 60%> +====1.37 - The seq Command====
-**Important** : La commande wall ignore la variable d’environnement TZ. L’heure affichée dans la première page est basée sur les paramètres de régionalisation du système. +
-</WRAP> +
- +
-====The seq Command====+
  
 The **seq** command prints numbers from FIRST to LAST, in steps of INCREMENT: The **seq** command prints numbers from FIRST to LAST, in steps of INCREMENT:
Ligne 939: Ligne 995:
  
 <code> <code>
-[root@centos7 ~]# seq 10+[root@centos8 ~]# seq 10
 1 1
 2 2
Ligne 950: Ligne 1006:
 9 9
 10 10
-[root@centos7 ~]# seq 20 30+[root@centos8 ~]# seq 20 30
 20 20
 21 21
Ligne 962: Ligne 1018:
 29 29
 30 30
-[root@centos7 ~]# seq 20 10 90+[root@centos8 ~]# seq 20 10 90
 20 20
 30 30
Ligne 971: Ligne 1027:
 80 80
 90 90
-[root@centos7 ~]#  +[root@centos8 ~]# 
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **seq** command to view the command line switches. **To do** : Use the **--help** option of the **seq** command to view the command line switches.
 </WRAP> </WRAP>
  
-====The screen Command====+====1.38 - The screen Command====
  
 Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive  shells). Each virtual terminal provides the functions of a DEC VT100 terminal and, in addition, several control functions from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and support for multiple character sets). There is a  scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows moving text regions between windows. Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive  shells). Each virtual terminal provides the functions of a DEC VT100 terminal and, in addition, several control functions from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and support for multiple character sets). There is a  scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows moving text regions between windows.
Ligne 987: Ligne 1043:
  
 <code> <code>
-[root@centos7 ~]#  which screen+[root@centos8 ~]#  which screen
 /usr/bin/which: no screen in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin) /usr/bin/which: no screen in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
-[root@centos7 ~]#  yum install screen 
-Loaded plugins: fastestmirror, langpacks 
-Loading mirror speeds from cached hostfile 
- * base: ftp.rezopole.net 
- * extras: centos.mirror.ate.info 
- * updates: centos.mirror.fr.planethoster.net 
-Resolving Dependencies 
---> Running transaction check 
----> Package screen.x86_64 0:4.1.0-0.23.20120314git3c2946.el7_2 will be installed 
---> Finished Dependency Resolution 
  
-Dependencies Resolved+[root@centos8 ~]# dnf makecache 
 +CentOS Linux 8 - AppStream                                                                                                                                                                                    7.9 kB/s | 4.3 kB     00:00     
 +CentOS Linux 8 - BaseOS                                                                                                                                                                                        31 kB/s | 3.9 kB     00:00     
 +CentOS Linux 8 - Extras                                                                                                                                                                                        17 kB/s | 1.5 kB     00:00     
 +Metadata cache created.
  
-================================================================================= +[root@centos8 ~]# dnf install screen -y 
- Package    Arch       Version                                 Repository   Size +Last metadata expiration check: 0:00:04 ago on Tue 20 Apr 2021 04:33:50 AM EDT. 
-=================================================================================+No match for argument: screen 
 +Error: Unable to find a match: screen 
 + 
 +[root@centos8 ~]# dnf install epel-release -y 
 +...                                                                                                                                                                             1/1  
 +Installed: 
 +  epel-release-8-8.el8.noarch                                                                                                                                                                                                                  
 + 
 +Complete! 
 + 
 +[root@centos8 ~]# dnf install screen -y 
 +Extra Packages for Enterprise Linux Modular 8 - x86_64                                                                                                                                                        522 kB/s | 559 kB     00:01     
 +Extra Packages for Enterprise Linux 8 - x86_64                                                                                                                                                                2.5 MB/s | 9.4 MB     00:03     
 +Last metadata expiration check: 0:00:01 ago on Tue 20 Apr 2021 04:36:11 AM EDT. 
 +Dependencies resolved. 
 +============================================================================================================================================================================================================================================== 
 + Package                                                 Architecture                                            Version                                                          Repository                                             Size 
 +==============================================================================================================================================================================================================================================
 Installing: Installing:
- screen     x86_64     4.1.0-0.23.20120314git3c2946.el7_2      updates     552 k+ screen                                                  x86_64                                                  4.6.2-10.el8                                                     epel                                                  582 k
  
 Transaction Summary Transaction Summary
-=================================================================================+==============================================================================================================================================================================================================================================
 Install  1 Package Install  1 Package
  
-Total download size: 552 +Total download size: 582 
-Installed size: 914 k +Installed size: 971 
-Is this ok [y/d/N]: y +Downloading Packages
-Downloading packages+screen-4.6.2-10.el8.x86_64.rpm                                                                                                                                                                                283 kB/s | 582 kB     00:02     
-screen-4.1.0-0.23.20120314git3c2946.el7_2.x86_64.rpm      552 kB  00:00:01     +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
 +Total                                                                                                                                                                                                         229 kB/s | 582 kB     00:02      
 +warning: /var/cache/dnf/epel-6519ee669354a484/packages/screen-4.6.2-10.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY 
 +Extra Packages for Enterprise Linux 8 - x86_64                                                                                                                                                                1.6 MB/s 1.6 kB     00:00     
 +Importing GPG key 0x2F86D6A1: 
 + Userid     : "Fedora EPEL (8) <epel@fedoraproject.org>" 
 + Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1 
 + From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 
 +Key imported successfully
 Running transaction check Running transaction check
 +Transaction check succeeded.
 Running transaction test Running transaction test
-Transaction test succeeded+Transaction test succeeded.
 Running transaction Running transaction
-  Installing : screen-4.1.0-0.23.20120314git3c2946.el7_2.x86_64              1/1  +  Preparing        :                                                                                                                                                                                                                      1/1  
-  Verifying  : screen-4.1.0-0.23.20120314git3c2946.el7_2.x86_64              1/1 +  Running scriptlet: screen-4.6.2-10.el8.x86_64                                                                                                                                                                                           1/1  
 +  Installing       : screen-4.6.2-10.el8.x86_64                                                                                                                                                                                           1/1  
 +  Running scriptlet: screen-4.6.2-10.el8.x86_64                                                                                                                                                                                           1/1  
 +  Verifying        : screen-4.6.2-10.el8.x86_64                                                                                                                                                                                           1/1 
  
 Installed: Installed:
-  screen.x86_64 0:4.1.0-0.23.20120314git3c2946.el7_2                             +  screen-4.6.2-10.el8.x86_64                                                                                                                                                                                                                  
  
 Complete! Complete!
-[root@centos7 ~]# which screen + 
-/bin/screen+[root@centos8 ~]# which screen 
 +/usr/bin/screen
 </code> </code>
  
Ligne 1035: Ligne 1115:
  
 <code> <code>
-[root@centos7 ~]# screen -S mysession+[root@centos8 ~]# screen -S mysession
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** - When using RHEL/CentOS 7, you will notice that the title of the window holding the ssh session changes to **[screen 0: root@centos7:~]**.+**Important** - When using RHEL/CentOS 8, you will notice that the title of the window holding the ssh session changes to **[screen 0: root@centos8:~]**.
 </WRAP> </WRAP>
  
Ligne 1045: Ligne 1125:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** - When using RHEL/CentOS 7, you will notice that the title of the window holding the ssh session changes to **[screen 1: root@centos7:~]**.+**Important** - When using RHEL/CentOS 8, you will notice that the title of the window holding the ssh session changes to **[screen 1: root@centos8:~]**.
 </WRAP> </WRAP>
  
Ligne 1053: Ligne 1133:
  
 <code> <code>
-[root@centos7 ~]# screen -ls+[root@centos8 ~]# screen -ls
 There is a screen on: There is a screen on:
-        25812.mysession (Attached) +        12149.mysession (Attached) 
-1 Socket in /var/run/screen/S-root.+1 Socket in /run/screen/S-root.
 </code> </code>
  
Ligne 1062: Ligne 1142:
  
 <code> <code>
-[root@centos7 ~]# sleep 9999 & +[root@centos8 ~]# sleep 9999 & 
-[1] 2272 +[1] 12187 
-[root@centos7 ~]# jobs +[root@centos8 ~]# jobs -l 
-[1]+  Running                 sleep 9999 & +[1]+ 12187 Running                 sleep 9999 & 
-[root@centos7 ~]# +[root@centos8 ~]# 
 </code> </code>
  
Ligne 1072: Ligne 1152:
  
 <code> <code>
-[root@centos7 ~]# screen -S mysession +<code> 
-[detached from 25812.mysession] +[root@centos8 ~]# screen -S mysession 
-[root@centos7 ~]# +[detached from 12149.mysession] 
 +[root@centos8 ~]# 
 </code> </code>
  
Ligne 1080: Ligne 1161:
  
 <code> <code>
-[root@centos7 ~]# screen -r+[root@centos8 ~]# screen -r
 </code> </code>
  
Ligne 1086: Ligne 1167:
  
 <code> <code>
-[root@centos7 ~]# jobs +[root@centos8 ~]# jobs -l 
-[1]+  Running                 sleep 9999 &+[1]+ 12187 Running                 sleep 9999 &
 </code> </code>
  
Ligne 1095: Ligne 1176:
  
 <code> <code>
-[root@centos7 ~]# screen -S mysession +[root@centos8 ~]# screen -S mysession 
-[detached from 25812.mysession] +[detached from 12149.mysession] 
-[root@centos7 ~]# +[root@centos8 ~]# 
 </code> </code>
  
Ligne 1103: Ligne 1184:
  
 <code> <code>
-[root@centos7 ~]# screen -S mysession1+[root@centos8 ~]# screen -S mysession1
 </code> </code>
  
Ligne 1109: Ligne 1190:
  
 <code> <code>
-[root@centos7 ~]# screen -ls+[root@centos8 ~]# screen -ls
 There are screens on: There are screens on:
-        14942.mysession1        (Attached) +        12191.mysession1        (Attached) 
-        25812.mysession (Detached) +        12149.mysession (Detached) 
-2 Sockets in /var/run/screen/S-root.+2 Sockets in /run/screen/S-root.
 </code> </code>
  
Ligne 1119: Ligne 1200:
  
 <code> <code>
-[root@centos7 ~]# screen -r 25812+[root@centos8 ~]# screen -r 12149 
 + 
 +[root@centos8 ~]# screen -ls 
 +There is a screen on: 
 +        12149.mysession (Attached) 
 +1 Socket in /run/screen/S-root. 
 +[root@centos8 ~]# sleep 9999 & 
 +[1] 12187 
 +[root@centos8 ~]# jobs -l 
 +[1]+ 12187 Running                 sleep 9999 & 
 +[root@centos8 ~]# jobs -l 
 +[1]+ 12187 Running                 sleep 9999 & 
 +[root@centos8 ~]#  
 +[root@centos8 ~]# screen -ls 
 +There are screens on: 
 +        12191.mysession1        (Attached) 
 +        12149.mysession (Attached) 
 +2 Sockets in /run/screen/S-root.
 </code> </code>
  
-Finallycheck out what has happened:+Once again detach the current screen by pressing the <key>CTRL</key> <key>a</key> keysreleasing the <key>a</key> key and then pressing <key>d</key>:
  
 <code> <code>
-[root@centos7 ~]# sleep 9999 & +[root@centos8 ~]# which screen 
-[1] 2272 +/usr/bin/screen 
-[root@centos7 ~]# jobs +[root@centos8 ~]# screen -S mysession 
-[1]+  Running                 sleep 9999 & +[detached from 12149.mysession
-[root@centos7 ~]# jobs +[root@centos8 ~]# screen -r 
-[1]+  Running                 sleep 9999 & +[detached from 12149.mysession
-[root@centos7 ~]# screen -ls +[root@centos8 ~]# screen -S mysession1 
-There is a screen on: +[detached from 12191.mysession1] 
-        25812.mysession (Attached) +[root@centos8 ~]#  
-1 Socket in /var/run/screen/S-root.+</code>
  
-[root@centos7 ~]# screen -ls+Now check which screen you are connected to: 
 + 
 +<code> 
 +[root@centos8 ~]# screen -ls
 There are screens on: There are screens on:
-        14942.mysession1        (Attached+ 12191.mysession1 (Detached
-        25812.mysession (Attached) + 12149.mysession (Attached) 
-2 Sockets in /var/run/screen/S-root.+2 Sockets in /run/screen/S-root. 
 +</code> 
 + 
 +Finally, kill the two sessions: 
 + 
 +<code> 
 +[root@centos8 ~]# screen -XS 12191 quit 
 +[root@centos8 ~]# screen -XS 12149 quit 
 +[root@centos8 ~]# screen -ls 
 +No Sockets found in /run/screen/S-root.
 </code> </code>
  
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **screen** command to view the command line switches. **To do** : Use the **--help** option of the **screen** command to view the command line switches.
 </WRAP> </WRAP>
  
-=====Switches and Arguments=====+=====LAB #2 - Switches and Arguments=====
  
 Switches under Linux can either be short or long. Several differences are important to note.  Switches under Linux can either be short or long. Several differences are important to note. 
Ligne 1163: Ligne 1273:
  
 <code> <code>
-[root@centos7 ~]# ls -lai /tmp +[root@centos8 ~]# ls -lai /tmp 
-total 244 +total 0 
-  11071 drwxrwxrwt. 10 root root    260 Sep 30 06:24 +16800396 drwxrwxrwt.  root root 172 Apr 20 04:36 
-    128 dr-xr-xr-x. 18 root root   4096 Dec 10  2015 .. +     128 dr-xr-xr-x. 17 root root 224 Apr 19 11:50 .. 
-  13635 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .font-unix +25447488 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .font-unix 
-  24858 drwxr-xr-x.  2 root root    100 Sep 30 06:05 hsperfdata_root + 8388741 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .ICE-unix 
-  13597 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .ICE-unix +     143 drwx------.  3 root root  17 Apr 19 12:05 systemd-private-d9ff2376a8a44f0392f860d80c839be4-chronyd.service-6im4Ii 
- 287056 drwxr-xr-x.  2 root root    100 Sep 28 12:30 inode +  621976 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .Test-unix 
-  24861 srw-------.  1 root root      0 Sep 28 10:52 .java_pid3213 +  621954 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .X11-unix 
-  25344 srw-------.  1 root root      0 Sep 28 10:52 .java_pid3302 +17319048 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .XIM-unix 
-  16615 drwx------.  3 root root     60 Sep 28 10:49 systemd-private-45071248a58f4fd2a4de940a5734c8ec-cups.service-ODc5L6 +[root@centos8 ~]# ls -ali /tmp 
-  13595 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .Test-unix +total 0 
-  13590 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .X11-unix +16800396 drwxrwxrwt.  root root 172 Apr 20 04:36 
-  13629 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .XIM-unix +     128 dr-xr-xr-x. 17 root root 224 Apr 19 11:50 .. 
-8098838 -rw-------.  1 root root 242724 Sep 30 05:45 yum_save_tx.2016-09-30.05-45.FF7KO4.yumtx +25447488 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .font-unix 
-[root@centos7 ~]# ls -ali /tmp + 8388741 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .ICE-unix 
-total 244 +     143 drwx------.  root root  17 Apr 19 12:05 systemd-private-d9ff2376a8a44f0392f860d80c839be4-chronyd.service-6im4Ii 
-  11071 drwxrwxrwt. 10 root root    260 Sep 30 06:24 +  621976 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .Test-unix 
-    128 dr-xr-xr-x. 18 root root   4096 Dec 10  2015 .. +  621954 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .X11-unix 
-  13635 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .font-unix +17319048 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .XIM-unix 
-  24858 drwxr-xr-x.  root root    100 Sep 30 06:05 hsperfdata_root +[root@centos8 ~]# ls -ial /tmp 
-  13597 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .ICE-unix +total 0 
- 287056 drwxr-xr-x.  2 root root    100 Sep 28 12:30 inode +16800396 drwxrwxrwt.  8 root root 172 Apr 20 04:36 . 
-  24861 srw-------.  root root      0 Sep 28 10:52 .java_pid3213 +     128 dr-xr-xr-x17 root root 224 Apr 19 11:50 .
-  25344 srw-------.  root root      0 Sep 28 10:52 .java_pid3302 +25447488 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .font-unix 
-  16615 drwx------.  3 root root     60 Sep 28 10:49 systemd-private-45071248a58f4fd2a4de940a5734c8ec-cups.service-ODc5L6 + 8388741 drwxrwxrwt.  root root   6 Apr 19 11:37 .ICE-unix 
-  13595 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .Test-unix +     143 drwx------.  3 root root  17 Apr 19 12:05 systemd-private-d9ff2376a8a44f0392f860d80c839be4-chronyd.service-6im4Ii 
-  13590 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .X11-unix +  621976 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .Test-unix 
-  13629 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .XIM-unix +  621954 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .X11-unix 
-8098838 -rw-------.  1 root root 242724 Sep 30 05:45 yum_save_tx.2016-09-30.05-45.FF7KO4.yumtx+17319048 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .XIM-unix
 </code> </code>
  
Ligne 1198: Ligne 1308:
  
 <code> <code>
-[root@centos7 ~]# ls -l --all --inode /tmp +[root@centos8 ~]# ls -l --all --inode /tmp 
-total 244 +total 0 
-  11071 drwxrwxrwt. 10 root root    260 Sep 30 06:24 +16800396 drwxrwxrwt.  root root 172 Apr 20 04:36 
-    128 dr-xr-xr-x. 18 root root   4096 Dec 10  2015 .. +     128 dr-xr-xr-x. 17 root root 224 Apr 19 11:50 .. 
-  13635 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .font-unix +25447488 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .font-unix 
-  24858 drwxr-xr-x.  2 root root    100 Sep 30 06:05 hsperfdata_root + 8388741 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .ICE-unix 
-  13597 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .ICE-unix +     143 drwx------.  3 root root  17 Apr 19 12:05 systemd-private-d9ff2376a8a44f0392f860d80c839be4-chronyd.service-6im4Ii 
- 287056 drwxr-xr-x.  2 root root    100 Sep 28 12:30 inode +  621976 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .Test-unix 
-  24861 srw-------.  1 root root      0 Sep 28 10:52 .java_pid3213 +  621954 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .X11-unix 
-  25344 srw-------.  1 root root      0 Sep 28 10:52 .java_pid3302 +17319048 drwxrwxrwt.  2 root root   6 Apr 19 11:37 .XIM-unix 
-  16615 drwx------.  3 root root     60 Sep 28 10:49 systemd-private-45071248a58f4fd2a4de940a5734c8ec-cups.service-ODc5L6 +[root@centos8 ~]# ls -l --allinode /tmp
-  13595 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .Test-unix +
-  13590 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .X11-unix +
-  13629 drwxrwxrwt.  2 root root     40 Sep 28 10:48 .XIM-unix +
-8098838 -rw-------.  1 root root 242724 Sep 30 05:45 yum_save_tx.2016-09-30.05-45.FF7KO4.yumtx +
- +
-[root@centos7 ~]# ls -l --allinode /tmp+
 ls: unrecognized option '--allinode' ls: unrecognized option '--allinode'
-Try 'ls --help' for more information+Try 'ls --help' for more information.
 </code> </code>
  
Ligne 1223: Ligne 1327:
 </WRAP> </WRAP>
  
-=====Manipulating Text Files=====+=====LAB #3 - Regular Expressions=====
  
 Text files play a very important role under Linux. For example, almost all configuration files are simple text files and being able to manipulate them is of great importance. Manipulating text files is essentially achieved by using **Regular Expressions**. There are two types of Regular Expressions: Text files play a very important role under Linux. For example, almost all configuration files are simple text files and being able to manipulate them is of great importance. Manipulating text files is essentially achieved by using **Regular Expressions**. There are two types of Regular Expressions:
Ligne 1229: Ligne 1333:
   * The IEEE POSIX Basic Regular Expressions (**BRE**) understood by the commands **vi**, **grep**, **expr** and **sed**,   * The IEEE POSIX Basic Regular Expressions (**BRE**) understood by the commands **vi**, **grep**, **expr** and **sed**,
   * The IEEE POSIX Extended Regular Expressions (**ERE**) understood by the commands **egrep** ( grep -E ) and **awk**.   * The IEEE POSIX Extended Regular Expressions (**ERE**) understood by the commands **egrep** ( grep -E ) and **awk**.
- 
-====Regular Expressions==== 
  
 Regular Expressions use **Metacharacters**. Certain are common to both BREs and EREs: Regular Expressions use **Metacharacters**. Certain are common to both BREs and EREs:
Ligne 1269: Ligne 1371:
 | %%|%% | Matches either the expression before or the expression after the operator | | %%|%% | Matches either the expression before or the expression after the operator |
 | () | Combines the Reguler Expressions between the parentheses | | () | Combines the Reguler Expressions between the parentheses |
 +
 +=====Manipulating Text Files=====
  
 ====Text-search Utilities==== ====Text-search Utilities====
Ligne 1282: Ligne 1386:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **grep** command to view the command line switches. **To do** : Use the **--help** option of the **grep** command to view the command line switches.
 </WRAP> </WRAP>
Ligne 1292: Ligne 1396:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **egrep** command to view the command line switches. **To do** : Use the **--help** option of the **egrep** command to view the command line switches.
 </WRAP> </WRAP>
Ligne 1300: Ligne 1404:
 The **fgrep** command is identical to the **grep** command when used with the **-F** switch. Both have no knowledge of Regular Expressions. The **fgrep** command is identical to the **grep** command when used with the **-F** switch. Both have no knowledge of Regular Expressions.
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **fgrep** command to view the command line switches. **To do** : Use the **--help** option of the **fgrep** command to view the command line switches.
 </WRAP> </WRAP>
  
-===LAB #- Using grep, egrep and fgrep===+===LAB #- Using grep, egrep and fgrep===
  
-Download the following file by clicking on it's title:+Create the following file:
  
-<file - greptest>+<code> 
 +[root@centos8 ~]# cd /tmp 
 +[root@centos8 tmp]# vi greptest 
 +[root@centos8 tmp]# cat greptest
 fenestrOS fenestrOS
 fenestros fenestros
Ligne 1316: Ligne 1423:
 .fe .fe
 £ £
-</file> 
- 
-Move the file to the **/tmp** directory: 
- 
-<code> 
-[root@centos7 ~]# mv /home/trainee/Downloads/greptest /tmp/greptest 
 </code> </code>
  
Ligne 1327: Ligne 1428:
  
 <code> <code>
-[root@centos7 ~]# grep '[a-zA-Z]' /tmp/greptest+[root@centos8 ~]# grep '[a-zA-Z]' /tmp/greptest
 fenestrOS fenestrOS
 fenestros fenestros
Ligne 1338: Ligne 1439:
  
 <code> <code>
-[root@centos7 ~]# grep '[a-zA-Z0-9]' /tmp/greptest+[root@centos8 ~]# grep '[a-zA-Z0-9]' /tmp/greptest
 fenestrOS fenestrOS
 fenestros fenestros
Ligne 1350: Ligne 1451:
  
 <code> <code>
-[root@centos7 ~]# grep '[0-9]\{3\}-[0-9]\{4\}' /tmp/greptest+[root@centos8 ~]# grep '[0-9]\{3\}-[0-9]\{4\}' /tmp/greptest
 555-5555 555-5555
 </code> </code>
Ligne 1357: Ligne 1458:
  
 <code> <code>
-[root@centos7 ~]# grep '^.$' /tmp/greptest+[root@centos8 ~]# grep '^.$' /tmp/greptest
 f f
 £ £
Ligne 1365: Ligne 1466:
  
 <code> <code>
-[root@centos7 ~]# grep '^\.' /tmp/greptest +[root@centos8 ~]# grep '^.$' /tmp/greptest 
-.fenestros +f 
-.fe+£
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-The grep command can also be used to search for a string in all the files within a specific directory as follows **grep -rnw 'directory' -e "pattern"**. You can also search only within certain files by specifying the files extensions: **grep --include={*.doc,*.xls} -rnw 'directory' -e "pattern"**. Finally you can exclude certain file extensions as follows: **grep --exclude=*.doc -rnw 'directory' -e "pattern"**.+**Important** - The grep command can also be used to search for a string in all the files within a specific directory as follows **grep -rnw 'directory' -e "pattern"**. You can also search only within certain files by specifying the files extensions: **grep --include={*.doc,*.xls} -rnw 'directory' -e "pattern"**. Finally you can exclude certain file extensions as follows: **grep --exclude=*.doc -rnw 'directory' -e "pattern"**.
 </WRAP> </WRAP>
  
-Download the following file by clicking on it's title:+Make the following changes to the greptest file:
  
-<file - greptest>+<code> 
 +[root@centos8 tmp]# vi greptest 
 +[root@centos8 tmp]# cat greptest
 # Starting comment # Starting comment
 fenestrOS fenestrOS
Ligne 1390: Ligne 1493:
 £ £
 # End comment # End comment
-</file> 
- 
-Move the file to the **/tmp** directory: 
- 
-<code> 
-[root@centos7 ~]# mv /home/trainee/Downloads/greptest /tmp/greptest 
 </code> </code>
  
Ligne 1401: Ligne 1498:
  
 <code> <code>
-[root@centos7 ~]# grep -E -v '^(#|$)' /tmp/greptest+[root@centos8 ~]# grep -E -v '^(#|$)' /tmp/greptest
 fenestrOS fenestrOS
 fenestros fenestros
Ligne 1412: Ligne 1509:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-The expression **'^(#|$)'** matches all lines beginning with the **#** character OR all lines with zero characters between the start and the end of the line.+**Important** - The expression **'^(#|$)'** matches all lines beginning with the **#** character OR all lines with zero characters between the start and the end of the line.
 </WRAP> </WRAP>
  
Ligne 1418: Ligne 1515:
  
 <code> <code>
-[root@centos7 ~]# egrep -v '^(#|$)'  /tmp/greptest > /tmp/greptest1 +[root@centos8 ~]# egrep -v '^(#|$)'  /tmp/greptest > /tmp/greptest1 
-[root@centos7 ~]# cat /tmp/greptest1+[root@centos8 ~]# cat /tmp/greptest1
 fenestrOS fenestrOS
 fenestros fenestros
Ligne 1433: Ligne 1530:
 </WRAP> </WRAP>
  
-Download the following file by clicking on it's title:+Make the following changes to the greptest file:
  
-<file text greptest>+<code> 
 +[root@centos8 tmp]# vi greptest 
 +[root@centos8 tmp]# cat greptest
 # Starting comment # Starting comment
 ^ This line will be used to demonstrate the use of fgrep ^ This line will be used to demonstrate the use of fgrep
Ligne 1450: Ligne 1549:
 £ £
 # End comment # End comment
-</file> 
- 
-Move the file to the **/tmp** directory: 
- 
-<code> 
-[root@centos7 ~]# mv /home/trainee/Downloads/greptest /tmp/greptest 
 </code> </code>
  
Ligne 1461: Ligne 1554:
  
 <code> <code>
-[root@centos7 ~]# fgrep '^' /tmp/greptest+[root@centos8 ~]# fgrep '^' /tmp/greptest
 ^ This line will be used to demonstrate the use of fgrep ^ This line will be used to demonstrate the use of fgrep
 </code> </code>
Ligne 1468: Ligne 1561:
  
 <code> <code>
-[root@centos7 ~]# grep '^' /tmp/greptest+[root@centos8 ~]# grep '^' /tmp/greptest
 # Starting comment # Starting comment
 ^ This line will be used to demonstrate the use of fgrep ^ This line will be used to demonstrate the use of fgrep
Ligne 1488: Ligne 1581:
  
 <code> <code>
-[root@centos7 ~]# grep '^\^' /tmp/greptest+[root@centos8 ~]# grep '^\^' /tmp/greptest
 ^ This line will be used to demonstrate the use of fgrep ^ This line will be used to demonstrate the use of fgrep
 </code> </code>
Ligne 1523: Ligne 1616:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **fgrep** command to view the command line switches. **To do** : Use the **--help** option of the **fgrep** command to view the command line switches.
 </WRAP> </WRAP>
  
-===LAB #- Using sed===+===LAB #- Using sed===
  
 Start by displaying the contents of the file **/etc/services** whilst inhibiting the display of the first 10 lines: Start by displaying the contents of the file **/etc/services** whilst inhibiting the display of the first 10 lines:
  
 <code> <code>
-[root@centos7 ~]# sed '1,10d' /etc/services | more+[root@centos8 ~]# sed '1,10d' /etc/services | more
 # are included, only the more common ones. # are included, only the more common ones.
 # #
Ligne 1556: Ligne 1649:
 systat          11/udp          users systat          11/udp          users
 daytime         13/tcp daytime         13/tcp
---More--                    +--Plus--                    
 </code> </code>
  
Ligne 1562: Ligne 1655:
  
 <code> <code>
-[root@centos7 ~]# sed '/^#/d' /etc/services | more+[root@centos8 ~]# sed '/^#/d' /etc/services | more
  
 tcpmux          1/tcp                           # TCP port service multiplexer tcpmux          1/tcp                           # TCP port service multiplexer
Ligne 1586: Ligne 1679:
 ftp             21/tcp ftp             21/tcp
 ftp             21/udp          fsp fspd ftp             21/udp          fsp fspd
---More--                        +--Plus--                        
 </code> </code>
  
Ligne 1596: Ligne 1689:
  
 <code> <code>
-[root@centos7 ~]# sed '1,2p' /etc/passwd+[root@centos8 ~]# sed '1,2p' /etc/passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
Ligne 1614: Ligne 1707:
  
 <code> <code>
-[root@centos7 ~]# sed -n '1,2p' /etc/passwd+<code> 
 +[root@centos8 ~]# sed -n '1,2p' /etc/passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 bin:x:1:1:bin:/bin:/sbin/nologin bin:x:1:1:bin:/bin:/sbin/nologin
Ligne 1622: Ligne 1716:
  
 <code> <code>
-[root@centos7 ~]# sed -n '/^#/!w /tmp/sedtest' /etc/services +[root@centos8 ~]# sed -n '/^#/!w /tmp/sedtest' /etc/services 
-[root@centos7 ~]# more /tmp/sedtest+[root@centos8 ~]# more /tmp/sedtest
  
 tcpmux          1/tcp                           # TCP port service multiplexer tcpmux          1/tcp                           # TCP port service multiplexer
Ligne 1647: Ligne 1741:
 ftp             21/tcp ftp             21/tcp
 ftp             21/udp          fsp fspd ftp             21/udp          fsp fspd
---More--(0%)+--Plus--(0%)
 </code> </code>
  
Ligne 1657: Ligne 1751:
  
 <code> <code>
-[root@centos7 ~]# echo "user1,user2,user3" > /tmp/sedtest1 +[root@centos8 ~]# echo "user1,user2,user3" > /tmp/sedtest1 
-[root@centos7 ~]# cat /tmp/sedtest1 | sed 's/,/ /g'+[root@centos8 ~]# cat /tmp/sedtest1 | sed 's/,/ /g'
 user1 user2 user3 user1 user2 user3
 </code> </code>
Ligne 1690: Ligne 1784:
  
 <code> <code>
-[root@centos7 ~]# ls -l | awk '{print $8 $3 $4}'+[root@centos8 tmp]# ls -l | awk '{print $8 $3 $4}'
  
-2015rootroot +05:23rootroot 
-19:09270users +05:21rootroot 
-2015rootroot +05:28rootroot 
-2015rootroot+05:29rootroot 
 +12:05rootroot
 </code> </code>
  
Ligne 1703: Ligne 1798:
  
 <code> <code>
-[root@centos7 ~]# ls -l | awk '{print $8 " " $3 " " $4}'+[root@centos8 tmp]# ls -l | awk '{print $8 " " $3 " " $4}'
      
-2015 root root +05:23 root root 
-19:09 270 users +05:21 root root 
-2015 root root +05:28 root root 
-2015 root root+05:29 root root 
 +12:05 root root
 </code> </code>
  
Ligne 1794: Ligne 1890:
  
 <code> <code>
-[root@centos7 ~]# cat > awkscript+[root@centos8 tmp]# cat > scriptawk
 BEGIN { BEGIN {
-  print "List of the currently mounted file systems"}+  print "Liste des systèmes de fichiers montés"}
 {print $0} {print $0}
 END { END {
-  print "=========================================="}+  print "====================================="}
 [^D] [^D]
 </code> </code>
Ligne 1806: Ligne 1902:
  
 <code> <code>
-[root@centos7 tmp]# awk -f awkscript /etc/fstab+[root@centos8 tmp]# awk -f scriptawk /etc/mtab
 Liste des systèmes de fichiers montés Liste des systèmes de fichiers montés
- +sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0 
-# +proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 
-/etc/fstab +devtmpfs /dev devtmpfs rw,seclabel,nosuid,size=1897604k,nr_inodes=474401,mode=755 0 0 
-# Created by anaconda on Sun Mar  8 12:38:10 2015 +securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0 
-+tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev 0 0 
-# Accessible filesystemsby referenceare maintained under '/dev/disk' +devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 
-# See man pages fstab(5)findfs(8)mount(8) and/or blkid(8) for more info +tmpfs /run tmpfs rw,seclabel,nosuid,nodev,mode=755 0 0 
-# +tmpfs /sys/fs/cgroup tmpfs ro,seclabel,nosuid,nodev,noexec,mode=755 0 0 
-UUID=b35de665-5ec8-4226-a533-58a1b567ac91                       xfs     defaults        1 1 +cgroup /sys/fs/cgroup/systemd cgroup rw,seclabel,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0 
-UUID=e8d3bd48-1386-411c-9675-41c3f8f1a309 /boot                   xfs     defaults        1 2 +pstore /sys/fs/pstore pstore rw,seclabel,nosuid,nodev,noexec,relatime 0 0 
-UUID=11a4d11d-81e4-46a7-82e0-7796cd597dc9 swap                    swap    defaults        0 0+bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0 
 +cgroup /sys/fs/cgroup/hugetlb cgroup rw,seclabel,nosuid,nodev,noexec,relatime,hugetlb 0 0 
 +cgroup /sys/fs/cgroup/devices cgroup rw,seclabel,nosuid,nodev,noexec,relatime,devices 0 0 
 +cgroup /sys/fs/cgroup/cpuset cgroup rw,seclabel,nosuid,nodev,noexec,relatime,cpuset 0 0 
 +cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,seclabel,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0 
 +cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,seclabel,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0 
 +cgroup /sys/fs/cgroup/rdma cgroup rw,seclabel,nosuid,nodev,noexec,relatime,rdma 0 0 
 +cgroup /sys/fs/cgroup/freezer cgroup rw,seclabel,nosuid,nodev,noexec,relatime,freezer 0 0 
 +cgroup /sys/fs/cgroup/perf_event cgroup rw,seclabel,nosuid,nodev,noexec,relatime,perf_event 0 0 
 +cgroup /sys/fs/cgroup/pids cgroup rw,seclabel,nosuid,nodev,noexec,relatime,pids 0 0 
 +cgroup /sys/fs/cgroup/blkio cgroup rw,seclabel,nosuid,nodev,noexec,relatime,blkio 0 0 
 +cgroup /sys/fs/cgroup/memory cgroup rw,seclabel,nosuid,nodev,noexec,relatime,memory 0 0 
 +none /sys/kernel/tracing tracefs rw,seclabel,relatime 0 0 
 +configfs /sys/kernel/config configfs rw,relatime 0 0 
 +/dev/sda3 / xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 
 +selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 
 +systemd-/proc/sys/fs/binfmt_misc autofs rw,relatime,fd=36,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=1976 0 0 
 +debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0 
 +hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime,pagesize=2M 0 0 
 +mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0 
 +/dev/sda1 /boot ext4 rw,seclabel,relatime 0 0 
 +sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0 
 +tmpfs /run/user/1000 tmpfs rw,seclabel,nosuid,nodev,relatime,size=382740k,mode=700,uid=1000,gid=1000 0 0 
 +binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0 
 +tracefs /sys/kernel/debug/tracing tracefs rw,seclabel,relatime 0 0
 ===================================== =====================================
 </code> </code>
Ligne 1937: Ligne 2057:
 ===Command Line Switches=== ===Command Line Switches===
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **awk** command to view the command line switches. **To do** : Use the **--help** option of the **awk** command to view the command line switches.
 </WRAP> </WRAP>
  
-===LAB #- Using awk===+===LAB #- Using awk===
  
-Download the file **sales.txt** by clicking on the title below:+Create the file **sales.txt**:
  
-<file text sales.txt> +<code> 
-FenestrOs.com+[root@centos8 tmp]# vi sales.txt 
 +[root@centos8 tmp]cat sales.txt
 # Annual sales by French department # Annual sales by French department
 # 83 # 83
Ligne 1965: Ligne 2086:
 Servers§12 Servers§12
 Ipads§56 Ipads§56
-</file>+</code>
  
-Now download the awk script **sales.awk** by clicking on the title below+Now create the awk script **sales.awk**: 
  
-<file text sales.awk>+<code> 
 +[root@centos8 tmp]# vi sales.awk 
 +[root@centos8 tmp]# cat sales.awk 
 # BEGIN # BEGIN
 BEGIN { BEGIN {
Ligne 1983: Ligne 2106:
  printf("PC Type :  %s \t Sales (06+13+83) : %10d\n",pc,sales[pc]);  printf("PC Type :  %s \t Sales (06+13+83) : %10d\n",pc,sales[pc]);
 } }
-</file>+</code>
  
 This script contains 13 lines. The purpose of this script is to calculate the total number of computers sold in the three French departments from the data present in the **sales** file: This script contains 13 lines. The purpose of this script is to calculate the total number of computers sold in the three French departments from the data present in the **sales** file:
Ligne 2017: Ligne 2140:
  
 <code> <code>
-[root@centos7 ~]# awk -f /home/trainee/Downloads/sales.awk /home/trainee/Downloads/sales.txt +[root@centos8 tmp]# awk -f /tmp/sales.awk /tmp/sales.txt
 PC Type :  Portables Sales (06+13+83) :        175 PC Type :  Portables Sales (06+13+83) :        175
-PC Type :  Ipads       Sales (06+13+83) :         76+PC Type :  Ipads   Sales (06+13+83) :         76
 PC Type :  Desktops Sales (06+13+83) :        329 PC Type :  Desktops Sales (06+13+83) :        329
-PC Type :  Servers       Sales (06+13+83) :         41+PC Type :  Servers   Sales (06+13+83) :         41
 </code> </code>
  
-====Other Useful Commands====+====LAB #7 - Other Useful Commands====
  
-===The expand Command===+===7.1 - The expand Command===
  
 The **expand** command converts tabulations in a file to spaces and prints the results to STDOUT. With no file as an argument or with the **-** character as an argument, the command takes it's input from STDIN. The **expand** command converts tabulations in a file to spaces and prints the results to STDOUT. With no file as an argument or with the **-** character as an argument, the command takes it's input from STDIN.
  
-Download the following file: +Create the following file:
- +
-<file text expand.txt> +
-un deux trois quatre cinq +
-un deux trois quatre cinq +
-un deux trois quatre cinq +
-un deux trois quatre cinq +
-un deux trois quatre cinq +
-un deux trois quatre cinq +
-un deux trois quatre cinq +
-un deux trois quatre cinq +
-un deux trois quatre cinq +
-un deux trois quatre cinq +
-</file> +
- +
-Move the file to the /root folder: +
- +
-<code> +
-[root@centos7 ~]# mv /home/trainee/Downloads/expand.txt /root/expand +
-</code> +
- +
-Use the **cat** command to view the contents of the file:+
  
 <code> <code>
-[root@centos7 ~]# cat expand+[root@centos8 tmp]# vi expand 
 +[root@centos8 tmp]# cat expand
 un deux trois quatre cinq un deux trois quatre cinq
 un deux trois quatre cinq un deux trois quatre cinq
Ligne 2065: Ligne 2168:
 un deux trois quatre cinq un deux trois quatre cinq
 un deux trois quatre cinq un deux trois quatre cinq
-</code>+</code>>
  
 Now use the **-vet** switches of the **cat** command to view the non-printable characters: Now use the **-vet** switches of the **cat** command to view the non-printable characters:
  
 <code> <code>
-[root@centos7 ~]# cat -vet expand+[root@centos8 tmp]# cat -vet expand
 un^Ideux^Itrois^Iquatre^Icinq$ un^Ideux^Itrois^Iquatre^Icinq$
 un^Ideux^Itrois^Iquatre^Icinq$ un^Ideux^Itrois^Iquatre^Icinq$
Ligne 2090: Ligne 2193:
  
 <code> <code>
-[root@centos7 ~]# expand expand > expand1+[root@centos8 ~]# expand expand > expand1
 </code> </code>
  
Ligne 2096: Ligne 2199:
  
 <code> <code>
-[root@centos7 ~]# cat -vet expand1+[root@centos8 ~]# cat -vet expand1
 un      deux    trois   quatre  cinq$ un      deux    trois   quatre  cinq$
 un      deux    trois   quatre  cinq$ un      deux    trois   quatre  cinq$
Ligne 2115: Ligne 2218:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **expand** command to view the command line switches. **To do** : Use the **--help** option of the **expand** command to view the command line switches.
 </WRAP> </WRAP>
  
-===La Commande unexpand===+===7.2 - The unexpand Command===
  
 The **expand** command converts spaces in a file to tabulations and prints the results to STDOUT. With no file as an argument or with the **-** character as an argument, the command takes it's input from STDIN. The **expand** command converts spaces in a file to tabulations and prints the results to STDOUT. With no file as an argument or with the **-** character as an argument, the command takes it's input from STDIN.
Ligne 2126: Ligne 2229:
  
 <code> <code>
-[root@centos7 ~]# cat -vet expand1+[root@centos8 ~]# cat -vet expand1
 un      deux    trois   quatre  cinq$ un      deux    trois   quatre  cinq$
 un      deux    trois   quatre  cinq$ un      deux    trois   quatre  cinq$
Ligne 2137: Ligne 2240:
 un      deux    trois   quatre  cinq$ un      deux    trois   quatre  cinq$
 un      deux    trois   quatre  cinq$ un      deux    trois   quatre  cinq$
-[root@centos7 ~]# unexpand -a expand1 > expand2 + 
-[root@centos7 ~]# cat -vet expand2+[root@centos8 ~]# unexpand -a expand1 > expand2 
 + 
 +[root@centos8 ~]# cat -vet expand2
 un^Ideux^Itrois^Iquatre^Icinq$ un^Ideux^Itrois^Iquatre^Icinq$
 un^Ideux^Itrois^Iquatre^Icinq$ un^Ideux^Itrois^Iquatre^Icinq$
Ligne 2157: Ligne 2262:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **unexpand** command to view the command line switches. **To do** : Use the **--help** option of the **unexpand** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The cut command===+===7.3 - The cut Command===
  
 The cut command splits each line of a file into columns starting with column 1. Each column contains one character. The command can also be used to split lines into fields where the default seperator is a tablulation. The default seperator can be changed by using the **-d** switch. The cut command splits each line of a file into columns starting with column 1. Each column contains one character. The command can also be used to split lines into fields where the default seperator is a tablulation. The default seperator can be changed by using the **-d** switch.
Ligne 2168: Ligne 2273:
  
 <code> <code>
-[root@centos7 ~]# cut -c1-7 /etc/passwd+[root@centos8 tmp]# cut -c1-7 /etc/passwd
 root:x: root:x:
 bin:x:1 bin:x:1
Ligne 2183: Ligne 2288:
 nobody: nobody:
 dbus:x: dbus:x:
 +systemd
 +systemd
 +tss:x:5
 polkitd polkitd
 unbound unbound
-colord: 
-usbmuxd 
-avahi:x 
-avahi-a 
-saslaut 
-qemu:x: 
 libstor libstor
-rpc:x:3 +cockpit 
-rpcuser +sssd:x: 
-nfsnobo +setroub
-rtkit:x +
-radvd:+
-ntp:x:3 +
-chrony: +
-abrt:x: +
-pulse:x +
-gdm:x:4 +
-gnome-i +
-postfix+
 sshd:x: sshd:x:
 +chrony:
 tcpdump tcpdump
 trainee trainee
-vboxadd +cockpit 
-tss:x:5+rngd:x: 
 +gluster 
 +qemu:x: 
 +rpc:x:3 
 +rpcuser 
 +saslaut 
 +radvd:x 
 +dnsmasq
 </code> </code>
  
Ligne 2214: Ligne 2315:
  
 <code> <code>
-[root@centos7 ~]# cut -c1-5,10-15,30- /etc/passwd+[root@centos8 tmp]# cut -c1-5,10-15,30- /etc/passwd
 root:0:rootsh root:0:rootsh
 bin:x:bin:/gin bin:x:bin:/gin
Ligne 2227: Ligne 2328:
 games2:100:es:/sbin/nologin games2:100:es:/sbin/nologin
 ftp:x50:FTP:/sbin/nologin ftp:x50:FTP:/sbin/nologin
-nobod99:99:/nologin+nobod65534:verflow User:/:/sbin/nologin
 dbus::81:Syus:/:/sbin/nologin dbus::81:Syus:/:/sbin/nologin
-polki:999:9lkitd:/:/sbin/nologin +systeoredumstemd Core Dumper:/:/sbin/nologin 
-unbou:998:9 resolver:/etc/unbound:/sbin/nologin +systeesolvetemd Resolver:/:/sbin/nologin 
-color997:99ord:/var/lib/colord:/sbin/nologin +tss:x59:Acche trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin 
-usbmu:113:1r:/:/sbin/nologin +polki:998:9lkitd:/:/sbin/nologin 
-avahi0:70:ASD Stack:/var/run/avahi-daemon:/sbin/nologin +unbou:997:9 resolver:/etc/unbound:/sbin/nologin
-avahioipd:x IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin +
-saslax:996:user":/run/saslauthd:/sbin/nologin +
-qemu:7:107:bin/nologin+
 libstemgmt:on account for libstoragemgmt:/var/run/lsm:/sbin/nologin libstemgmt:on account for libstoragemgmt:/var/run/lsm:/sbin/nologin
-rpc:x32:Rpcar/lib/rpcbind:/sbin/nologin +cockps:x:99 cockpit-ws:/nonexisting:/sbin/nologin 
-rpcus:29:29ser:/var/lib/nfs:/sbin/nologin +sssd:4:990:/:/sbin/nologin 
-nfsno:x:655mous NFS User:/var/lib/nfs:/sbin/nologin +setroshoot:r/lib/setroubleshoot:/sbin/nologin
-rtkit72:172proc:/sbin/nologin +
-radvd5:75:rbin/nologin +
-ntp:x38::/eologin +
-chron994:99rony:/sbin/nologin +
-abrt:3:173:in/nologin +
-pulse71:171stem Daemon:/var/run/pulse:/sbin/nologin +
-gdm:x42::/vin/nologin +
-gnometial-s::/run/gnome-initial-setup/:/sbin/nologin +
-postf:89:89ostfix:/sbin/nologin+
 sshd::74:Prted SSH:/var/empty/sshd:/sbin/nologin sshd::74:Prted SSH:/var/empty/sshd:/sbin/nologin
 +chron992:98rony:/sbin/nologin
 tcpdu:72:72gin tcpdu:72:72gin
 train:1000:home/trainee:/bin/bash train:1000:home/trainee:/bin/bash
-vboxa:992:1xadd:/bin/false +cockpsinstaUser for cockpit-ws instances:/nonexisting:/sbin/nologin 
-tss:x59:Acche trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin+rngd:0:986:Generator Daemon:/var/lib/rngd:/sbin/nologin 
 +glust:989:9aemons:/run/gluster:/sbin/nologin 
 +qemu:7:107:bin/nologin 
 +rpc:x32:Rpcar/lib/rpcbind:/sbin/nologin 
 +rpcus:29:29ser:/var/lib/nfs:/sbin/nologin 
 +saslax:988:ser:/run/saslauthd:/sbin/nologin 
 +radvd5:75:rbin/nologin 
 +dnsma:983:9P and DNS server:/var/lib/dnsmasq:/sbin/nologi
 </code> </code>
  
Ligne 2260: Ligne 2357:
  
 <code> <code>
-[root@centos7 ~]# cut -d: -f2,4,6 /etc/passwd+[root@centos8 tmp]# cut -d: -f2,4,6 /etc/passwd
 x:0:/root x:0:/root
 x:1:/bin x:1:/bin
Ligne 2273: Ligne 2370:
 x:100:/usr/games x:100:/usr/games
 x:50:/var/ftp x:50:/var/ftp
-x:99:/+x:65534:/
 x:81:/ x:81:/
-x:998:/ +x:997:/ 
-x:997:/etc/unbound +x:193:/ 
-x:996:/var/lib/colord +x:59:/dev/null 
-x:113:/ +x:996:/ 
-x:70:/var/run/avahi-daemon +x:994:/etc/unbound 
-x:170:/var/lib/avahi-autoipd +x:993:/var/run/lsm 
-x:76:/run/saslauthd+x:991:/nonexisting 
 +x:990:/ 
 +x:989:/var/lib/setroubleshoot 
 +x:74:/var/empty/sshd 
 +x:988:/var/lib/chrony 
 +x:72:/ 
 +x:1000:/home/trainee 
 +x:987:/nonexisting 
 +x:986:/var/lib/rngd 
 +x:985:/run/gluster
 x:107:/ x:107:/
-x:994:/var/run/lsm 
 x:32:/var/lib/rpcbind x:32:/var/lib/rpcbind
 x:29:/var/lib/nfs x:29:/var/lib/nfs
-x:65534:/var/lib/nfs +x:76:/run/saslauthd
-x:172:/proc+
 x:75:/ x:75:/
-x:38:/etc/ntp +x:983:/var/lib/dnsmasq
-x:993:/var/lib/chrony +
-x:173:/etc/abrt +
-x:171:/var/run/pulse +
-x:42:/var/lib/gdm +
-x:991:/run/gnome-initial-setup/ +
-x:89:/var/spool/postfix +
-x:74:/var/empty/sshd +
-x:72:/ +
-x:1000:/home/trainee +
-x:1:/var/run/vboxadd +
-x:59:/dev/null+
 </code> </code>
- 
-<WRAP center round important 60%> 
-**Important**: Note the use of the **-d** switch to change the default seperator. 
-</WRAP> 
  
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **cut** command to view the command line switches. **To do** : Use the **--help** option of the **cut** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The uniq Command===+===7.4 - The uniq Command===
  
 The following command is used to extract the Primary Group GIDs from the **/etc/passwd** file: The following command is used to extract the Primary Group GIDs from the **/etc/passwd** file:
  
 <code> <code>
-[root@centos7 ~]# cut -d: -f4 /etc/passwd | sort -n | uniq+[root@centos8 tmp]# cut -d: -f4 /etc/passwd | sort -n | uniq
 0 0
 1 1
Ligne 2327: Ligne 2416:
 29 29
 32 32
-38 
-42 
 50 50
 59 59
-70 
 72 72
 74 74
Ligne 2337: Ligne 2423:
 76 76
 81 81
-89 
-99 
 100 100
 107 107
-113 +193 
-170 +983 
-171 +985 
-172 +986 
-173+987 
 +988 
 +989 
 +990
 991 991
 993 993
Ligne 2351: Ligne 2438:
 996 996
 997 997
-998 
 1000 1000
 65534 65534
Ligne 2362: Ligne 2448:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **uniq** command to view the command line switches. **To do** : Use the **--help** option of the **uniq** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The tr Command===+===7.5 - The tr Command===
  
 The **tr** command is used to substitute certain characters by other characters. This command **only** accepts data from standard input (hence the pipe): The **tr** command is used to substitute certain characters by other characters. This command **only** accepts data from standard input (hence the pipe):
  
 <code> <code>
-[root@centos7 ~]# cat /etc/passwd | tr "[a-z]" "[A-Z]"+[root@centos8 tmp]# cat /etc/passwd | tr "[a-z]" "[A-Z]"
 ROOT:X:0:0:ROOT:/ROOT:/BIN/BASH ROOT:X:0:0:ROOT:/ROOT:/BIN/BASH
 BIN:X:1:1:BIN:/BIN:/SBIN/NOLOGIN BIN:X:1:1:BIN:/BIN:/SBIN/NOLOGIN
Ligne 2384: Ligne 2470:
 GAMES:X:12:100:GAMES:/USR/GAMES:/SBIN/NOLOGIN GAMES:X:12:100:GAMES:/USR/GAMES:/SBIN/NOLOGIN
 FTP:X:14:50:FTP USER:/VAR/FTP:/SBIN/NOLOGIN FTP:X:14:50:FTP USER:/VAR/FTP:/SBIN/NOLOGIN
-NOBODY:X:99:99:NOBODY:/:/SBIN/NOLOGIN+NOBODY:X:65534:65534:KERNEL OVERFLOW USER:/:/SBIN/NOLOGIN
 DBUS:X:81:81:SYSTEM MESSAGE BUS:/:/SBIN/NOLOGIN DBUS:X:81:81:SYSTEM MESSAGE BUS:/:/SBIN/NOLOGIN
-POLKITD:X:999:998:USER FOR POLKITD:/:/SBIN/NOLOGIN +SYSTEMD-COREDUMP:X:999:997:SYSTEMD CORE DUMPER:/:/SBIN/NOLOGIN 
-UNBOUND:X:998:997:UNBOUND DNS RESOLVER:/ETC/UNBOUND:/SBIN/NOLOGIN +SYSTEMD-RESOLVE:X:193:193:SYSTEMD RESOLVER:/:/SBIN/NOLOGIN 
-COLORD:X:997:996:USER FOR COLORD:/VAR/LIB/COLORD:/SBIN/NOLOGIN +TSS:X:59:59:ACCOUNT USED BY THE TROUSERS PACKAGE TO SANDBOX THE TCSD DAEMON:/DEV/NULL:/SBIN/NOLOGIN 
-USBMUXD:X:113:113:USBMUXD USER:/:/SBIN/NOLOGIN +POLKITD:X:998:996:USER FOR POLKITD:/:/SBIN/NOLOGIN 
-AVAHI:X:70:70:AVAHI MDNS/DNS-SD STACK:/VAR/RUN/AVAHI-DAEMON:/SBIN/NOLOGIN +UNBOUND:X:997:994:UNBOUND DNS RESOLVER:/ETC/UNBOUND:/SBIN/NOLOGIN 
-AVAHI-AUTOIPD:X:170:170:AVAHI IPV4LL STACK:/VAR/LIB/AVAHI-AUTOIPD:/SBIN/NOLOGIN +LIBSTORAGEMGMT:X:996:993:DAEMON ACCOUNT FOR LIBSTORAGEMGMT:/VAR/RUN/LSM:/SBIN/NOLOGIN 
-SASLAUTH:X:996:76:"SASLAUTHD USER":/RUN/SASLAUTHD:/SBIN/NOLOGIN+COCKPIT-WS:X:995:991:USER FOR COCKPIT-WS:/NONEXISTING:/SBIN/NOLOGIN 
 +SSSD:X:994:990:USER FOR SSSD:/:/SBIN/NOLOGIN 
 +SETROUBLESHOOT:X:993:989::/VAR/LIB/SETROUBLESHOOT:/SBIN/NOLOGIN 
 +SSHD:X:74:74:PRIVILEGE-SEPARATED SSH:/VAR/EMPTY/SSHD:/SBIN/NOLOGIN 
 +CHRONY:X:992:988::/VAR/LIB/CHRONY:/SBIN/NOLOGIN 
 +TCPDUMP:X:72:72::/:/SBIN/NOLOGIN 
 +TRAINEE:X:1000:1000:TRAINEE:/HOME/TRAINEE:/BIN/BASH 
 +COCKPIT-WSINSTANCE:X:991:987:USER FOR COCKPIT-WS INSTANCES:/NONEXISTING:/SBIN/NOLOGIN 
 +RNGD:X:990:986:RANDOM NUMBER GENERATOR DAEMON:/VAR/LIB/RNGD:/SBIN/NOLOGIN 
 +GLUSTER:X:989:985:GLUSTERFS DAEMONS:/RUN/GLUSTER:/SBIN/NOLOGIN
 QEMU:X:107:107:QEMU USER:/:/SBIN/NOLOGIN QEMU:X:107:107:QEMU USER:/:/SBIN/NOLOGIN
-LIBSTORAGEMGMT:X:995:994:DAEMON ACCOUNT FOR LIBSTORAGEMGMT:/VAR/RUN/LSM:/SBIN/NOLOGIN 
 RPC:X:32:32:RPCBIND DAEMON:/VAR/LIB/RPCBIND:/SBIN/NOLOGIN RPC:X:32:32:RPCBIND DAEMON:/VAR/LIB/RPCBIND:/SBIN/NOLOGIN
 RPCUSER:X:29:29:RPC SERVICE USER:/VAR/LIB/NFS:/SBIN/NOLOGIN RPCUSER:X:29:29:RPC SERVICE USER:/VAR/LIB/NFS:/SBIN/NOLOGIN
-NFSNOBODY:X:65534:65534:ANONYMOUS NFS USER:/VAR/LIB/NFS:/SBIN/NOLOGIN +SASLAUTH:X:988:76:SASLAUTHD USER:/RUN/SASLAUTHD:/SBIN/NOLOGIN
-RTKIT:X:172:172:REALTIMEKIT:/PROC:/SBIN/NOLOGIN+
 RADVD:X:75:75:RADVD USER:/:/SBIN/NOLOGIN RADVD:X:75:75:RADVD USER:/:/SBIN/NOLOGIN
-NTP:X:38:38::/ETC/NTP:/SBIN/NOLOGIN +DNSMASQ:X:983:983:DNSMASQ DHCP AND DNS SERVER:/VAR/LIB/DNSMASQ:/SBIN/NOLOGIN
-CHRONY:X:994:993::/VAR/LIB/CHRONY:/SBIN/NOLOGIN +
-ABRT:X:173:173::/ETC/ABRT:/SBIN/NOLOGIN +
-PULSE:X:171:171:PULSEAUDIO SYSTEM DAEMON:/VAR/RUN/PULSE:/SBIN/NOLOGIN +
-GDM:X:42:42::/VAR/LIB/GDM:/SBIN/NOLOGIN +
-GNOME-INITIAL-SETUP:X:993:991::/RUN/GNOME-INITIAL-SETUP/:/SBIN/NOLOGIN +
-POSTFIX:X:89:89::/VAR/SPOOL/POSTFIX:/SBIN/NOLOGIN +
-SSHD:X:74:74:PRIVILEGE-SEPARATED SSH:/VAR/EMPTY/SSHD:/SBIN/NOLOGIN +
-TCPDUMP:X:72:72::/:/SBIN/NOLOGIN +
-TRAINEE:X:1000:1000:TRAINEE:/HOME/TRAINEE:/BIN/BASH +
-VBOXADD:X:992:1::/VAR/RUN/VBOXADD:/BIN/FALSE +
-TSS:X:59:59:ACCOUNT USED BY THE TROUSERS PACKAGE TO SANDBOX THE TCSD DAEMON:/DEV/NULL:/SBIN/NOLOGIN+
 </code> </code>
  
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **tr** command to view the command line switches. **To do** : Use the **--help** option of the **tr** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The paste Command===+===7.6 - The paste Command===
  
 The **paste** command concatenates lines from n files. For example: The **paste** command concatenates lines from n files. For example:
  
 <code> <code>
-[root@centos7 ~]# paste -d: /etc/passwd /etc/shadow +[root@centos8 tmp]# paste -d: /etc/passwd /etc/shadow 
-root:x:0:0:root:/root:/bin/bash:root:$6$r4px/s9L2uwGSFnI$NkK5mzNF.CMAFFqMcO.i.tnrMZQDkriDLYwICsimsPaDWKFwUHS3NhDwZY5e7P3glIu.gTBtaOE.SOOW/D.AU/:16502:0:99999:7::: +root:x:0:0:root:/root:/bin/bash:root:$6$9Sa1IumuSlJc8EBg$8jGU/4xGCXy64QuBSMyKOC6/FWs41rdY5tzF5/7yHG6FRS2Y2eOJIcst1JbcvNoqMPDU4lpZ6THW97jwGuQNf1::0:99999:7::: 
-bin:x:1:1:bin:/bin:/sbin/nologin:bin:*:16231:0:99999:7::: +bin:x:1:1:bin:/bin:/sbin/nologin:bin:*:18264:0:99999:7::: 
-daemon:x:2:2:daemon:/sbin:/sbin/nologin:daemon:*:16231:0:99999:7::: +daemon:x:2:2:daemon:/sbin:/sbin/nologin:daemon:*:18264:0:99999:7::: 
-adm:x:3:4:adm:/var/adm:/sbin/nologin:adm:*:16231:0:99999:7::: +adm:x:3:4:adm:/var/adm:/sbin/nologin:adm:*:18264:0:99999:7::: 
-lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin:lp:*:16231:0:99999:7::: +lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin:lp:*:18264:0:99999:7::: 
-sync:x:5:0:sync:/sbin:/bin/sync:sync:*:16231:0:99999:7::: +sync:x:5:0:sync:/sbin:/bin/sync:sync:*:18264:0:99999:7::: 
-shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown:shutdown:*:16231:0:99999:7::: +shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown:shutdown:*:18264:0:99999:7::: 
-halt:x:7:0:halt:/sbin:/sbin/halt:halt:*:16231:0:99999:7::: +halt:x:7:0:halt:/sbin:/sbin/halt:halt:*:18264:0:99999:7::: 
-mail:x:8:12:mail:/var/spool/mail:/sbin/nologin:mail:*:16231:0:99999:7::: +mail:x:8:12:mail:/var/spool/mail:/sbin/nologin:mail:*:18264:0:99999:7::: 
-operator:x:11:0:operator:/root:/sbin/nologin:operator:*:16231:0:99999:7::: +operator:x:11:0:operator:/root:/sbin/nologin:operator:*:18264:0:99999:7::: 
-games:x:12:100:games:/usr/games:/sbin/nologin:games:*:16231:0:99999:7::: +games:x:12:100:games:/usr/games:/sbin/nologin:games:*:18264:0:99999:7::: 
-ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin:ftp:*:16231:0:99999:7::: +ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin:ftp:*:18264:0:99999:7::: 
-nobody:x:99:99:Nobody:/:/sbin/nologin:nobody:*:16231:0:99999:7::: +nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin:nobody:*:18264:0:99999:7::: 
-dbus:x:81:81:System message bus:/:/sbin/nologin:dbus:!!:16502:::::: +dbus:x:81:81:System message bus:/:/sbin/nologin:dbus:!!:18390:::::: 
-polkitd:x:999:998:User for polkitd:/:/sbin/nologin:polkitd:!!:16502:::::: +systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin:systemd-coredump:!!:18390:::::: 
-unbound:x:998:997:Unbound DNS resolver:/etc/unbound:/sbin/nologin:unbound:!!:16502:::::: +systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin:systemd-resolve:!!:18390:::::: 
-colord:x:997:996:User for colord:/var/lib/colord:/sbin/nologin:colord:!!:16502:::::: +tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin:tss:!!:18390:::::: 
-usbmuxd:x:113:113:usbmuxd user:/:/sbin/nologin:usbmuxd:!!:16502:::::: +polkitd:x:998:996:User for polkitd:/:/sbin/nologin:polkitd:!!:18390:::::: 
-avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin:avahi:!!:16502:::::: +unbound:x:997:994:Unbound DNS resolver:/etc/unbound:/sbin/nologin:unbound:!!:18390:::::: 
-avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin:avahi-autoipd:!!:16502:::::: +libstoragemgmt:x:996:993:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin:libstoragemgmt:!!:18390:::::: 
-saslauth:x:996:76:"Saslauthd user":/run/saslauthd:/sbin/nologin:saslauth:!!:16502:::::: +cockpit-ws:x:995:991:User for cockpit-ws:/nonexisting:/sbin/nologin:cockpit-ws:!!:18390:::::: 
-qemu:x:107:107:qemu user:/:/sbin/nologin:qemu:!!:16502:::::: +sssd:x:994:990:User for sssd:/:/sbin/nologin:sssd:!!:18390:::::: 
-libstoragemgmt:x:995:994:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin:libstoragemgmt:!!:16502:::::: +setroubleshoot:x:993:989::/var/lib/setroubleshoot:/sbin/nologin:setroubleshoot:!!:18390:::::: 
-rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin:rpc:!!:16502:0:99999:7::: +sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin:sshd:!!:18390:::::: 
-rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin:rpcuser:!!:16502:::::: +chrony:x:992:988::/var/lib/chrony:/sbin/nologin:chrony:!!:18390:::::: 
-nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin:nfsnobody:!!:16502:::::: +tcpdump:x:72:72::/:/sbin/nologin:tcpdump:!!:18390:::::: 
-rtkit:x:172:172:RealtimeKit:/proc:/sbin/nologin:rtkit:!!:16502:::::: +trainee:x:1000:1000:trainee:/home/trainee:/bin/bash:trainee:$6$p4HOAHX7UAzw1nQh$VZL12Lye.mR8v1IP2e4f0PCW8DzHj2MMAaA7r2ZLoTnQN7Ziskce3bo/xTMu1bXZm5GebJjSw7.X5tABVNoJ2/::0:99999:7::: 
-radvd:x:75:75:radvd user:/:/sbin/nologin:radvd:!!:16502:::::: +cockpit-wsinstance:x:991:987:User for cockpit-ws instances:/nonexisting:/sbin/nologin:cockpit-wsinstance:!!:18736:::::: 
-ntp:x:38:38::/etc/ntp:/sbin/nologin:ntp:!!:16502:::::: +rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin:rngd:!!:18736:::::: 
-chrony:x:994:993::/var/lib/chrony:/sbin/nologin:chrony:!!:16502:::::: +gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin:gluster:!!:18736:::::: 
-abrt:x:173:173::/etc/abrt:/sbin/nologin:abrt:!!:16502:::::: +qemu:x:107:107:qemu user:/:/sbin/nologin:qemu:!!:18736:::::: 
-pulse:x:171:171:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin:pulse:!!:16502:::::: +rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin:rpc:!!:18736:0:99999:7::: 
-gdm:x:42:42::/var/lib/gdm:/sbin/nologin:gdm:!!:16502:::::: +rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin:rpcuser:!!:18736:::::: 
-gnome-initial-setup:x:993:991::/run/gnome-initial-setup/:/sbin/nologin:gnome-initial-setup:!!:16502:::::: +saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin:saslauth:!!:18736:::::: 
-postfix:x:89:89::/var/spool/postfix:/sbin/nologin:postfix:!!:16502:::::: +radvd:x:75:75:radvd user:/:/sbin/nologin:radvd:!!:18736:::::: 
-sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin:sshd:!!:16502:::::: +dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin:dnsmasq:!!:18736::::::
-tcpdump:x:72:72::/:/sbin/nologin:tcpdump:!!:16502:::::: +
-trainee:x:1000:1000:trainee:/home/trainee:/bin/bash:trainee:$6$tMd44tmmFiitAS7.$sJSua3jhyKm2k0mIifYuTpUO0d6q6/gS3PDyuxbHadHVYLsoVslZ3Pn8m5X93rr64oj.KK8OL6J.gvhxbQBrZ1:16502:0:99999:7::: +
-vboxadd:x:992:1::/var/run/vboxadd:/bin/false:vboxadd:!!:16691:::::: +
-tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin:tss:!!:16723::::::+
 </code> </code>
- 
-<WRAP center round important 60%> 
-**Important**: Note that you need to become root to be able to execute this command. The reason is that normal users do not have the right to read the **/etc/shadow** file. 
-</WRAP> 
  
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **paste** command to view the command line switches. **To do** : Use the **--help** option of the **paste** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The split Command===+===7.7 - The split Command===
  
 The split command is used to divide a large file into smaller segments. Create an empty 250 MB file as follows: The split command is used to divide a large file into smaller segments. Create an empty 250 MB file as follows:
  
 <code> <code>
-[root@centos7 ~]# dd if=/dev/zero of=/file bs=1024k count=250+[root@centos8 tmp]# dd if=/dev/zero of=/file bs=1024k count=250
 250+0 records in 250+0 records in
 250+0 records out 250+0 records out
-262144000 bytes (262 MB) copied, 0.215447 s, 1.GB/s +262144000 bytes (262 MB, 250 MiB) copied, 0.143522 s, 1.GB/s 
-</code>  +</code> 
  
 Now use the split command to divide the file into 5 smaller files each of 50: Now use the split command to divide the file into 5 smaller files each of 50:
  
 <code> <code>
-[root@centos7 ~]# split -b 50m /file filepart +[root@centos8 tmp]# split -b 50m /file filepart 
-[root@centos7 ~]# ls -l | grep filepart +[root@centos8 tmp]# ls -l | grep filepart 
--rw-r--r--.  1 root root  52428800 Oct 19 15:31 filepartaa +-rw-r--r--. 1 root root 52428800 Apr 20 07:14 filepartaa 
--rw-r--r--.  1 root root  52428800 Oct 19 15:31 filepartab +-rw-r--r--. 1 root root 52428800 Apr 20 07:14 filepartab 
--rw-r--r--.  1 root root  52428800 Oct 19 15:31 filepartac +-rw-r--r--. 1 root root 52428800 Apr 20 07:14 filepartac 
--rw-r--r--.  1 root root  52428800 Oct 19 15:31 filepartad +-rw-r--r--. 1 root root 52428800 Apr 20 07:14 filepartad 
--rw-r--r--.  1 root root  52428800 Oct 19 15:31 filepartae+-rw-r--r--. 1 root root 52428800 Apr 20 07:14 filepartae
 </code> </code>
  
Ligne 2508: Ligne 2582:
  
 <code> <code>
-[root@centos7 ~]# cat fileparta* > newfile +[root@centos8 tmp]# cat fileparta* > newfile 
-[root@centos7 ~]# ls -l | grep newf +[root@centos8 tmp]# ls -l | grep newf 
--rw-r--r--.  1 root root  262144000 Oct 19 15:31 newfile+-rw-r--r--. 1 root root 262144000 Apr 20 07:15 newfile 
 +[root@centos8 tmp]# ls -l / | grep file 
 +-rw-r--r--.   1 root root 262144000 Apr 20 07:14 file
 </code> </code>
  
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **split** command to view the command line switches. **To do** : Use the **--help** option of the **split** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The diff Command===+===7.8 - The diff Command===
  
 The diff command compares two fles and indicates what changes need to be made to the first file in order that it be identical to the second file. The diff command compares two fles and indicates what changes need to be made to the first file in order that it be identical to the second file.
Ligne 2526: Ligne 2602:
  
 <code> <code>
-[root@centos ~]# cp /etc/passwd /root+[root@centos8 ~]# cp /etc/passwd /root
 </code> </code>
  
Ligne 2541: Ligne 2617:
 <file> <file>
 ... ...
-Linux is great!+Linux est super!
 </file> </file>
  
Ligne 2547: Ligne 2623:
  
 <code> <code>
-[root@centos7 ~]# diff /etc/passwd /root/passwd +[root@centos8 tmp]# diff /etc/passwd /root/passwd 
-38,39c38+26,27c26 
 +< tcpdump:x:72:72::/:/sbin/nologin
 < trainee:x:1000:1000:trainee:/home/trainee:/bin/bash < trainee:x:1000:1000:trainee:/home/trainee:/bin/bash
-< vboxadd:x:992:1::/var/run/vboxadd:/bin/false 
 --- ---
 > trainee10:x:1000:1000:trainee:/home/trainee:/bin/bash > trainee10:x:1000:1000:trainee:/home/trainee:/bin/bash
-40a40 +36a36 
-> Linux is great!+> Linux est super!
 </code> </code>
  
 In this output you will notice the **<** and **>** characters. The first makes reference to the first file, /etc/passwd, whist the second makes reference to the second file, /root/passwd. In this output you will notice the **<** and **>** characters. The first makes reference to the first file, /etc/passwd, whist the second makes reference to the second file, /root/passwd.
  
-The output **38,39c38** means that line 39 needs to be changed in /etc/passwd so that is the same as line 38 in /root/passwd.+The output **26,27c26** means that line 27 needs to be changed in /etc/passwd so that is the same as line 26 in /root/passwd.
  
-The output **40a40** means that at line 40 in /etc/passwd line 40 from /root/passwd needs to be added.+The output **36a36** means that at line 36 in /etc/passwd line 36 from /root/passwd needs to be added.
  
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **diff** command to view the command line switches. **To do** : Use the **--help** option of the **diff** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The cmp Command===+===7.9 - The cmp Command===
  
 The **cmp** command compares two files character by character. By default, the command stops after finding the first difference: The **cmp** command compares two files character by character. By default, the command stops after finding the first difference:
  
 <code> <code>
-[root@centos7 ~]# cmp /root/passwd /etc/passwd +[root@centos8 tmp]# cmp /root/passwd /etc/passwd 
-/root/passwd /etc/passwd differ: byte 1873, line 38+/root/passwd /etc/passwd differ: byte 1300, line 26
 </code> </code>
  
Ligne 2581: Ligne 2657:
  
 <code> <code>
-[root@centos7 ~]# cmp -l /root/passwd /etc/passwd | more +[root@centos8 tmp]# cmp -l /root/passwd /etc/passwd | more 
-cmp: EOF on /root/passwd +cmp: EOF on /root/passwd after byte 1931 
-1873  61  72 +1300 162 143 
-1874  60 170 +1301 141 160 
-1876 170  61 +1302 151 144 
-1877  72  60 +1303 156 165 
-1878  61  60 +1304 145 155 
-1880  60  72 +1305 145 160 
-1881  60  61 +1306  61  72 
-1882  72  60 +1307  60 170 
-1883  61  60 +1309 170  67 
-1885  60  72 +1310  72  62 
-1886  60 164 +1311  61  72 
-1887  72 162 +1312  60  67 
-1888 164 141 +1313  60  62 
-1889 162 151 +1314  60  72 
-1890 141 156 +1316  61  57 
-1891 151 145 +1317  60  72 
-1892 156 145 +1318  60  57 
-1893 145  72 +1319  60 163 
-1894 145  57 +1320  72 142 
-1895  72 150 +1321 164 151 
-1896  57 157 +1322 162 156 
-1897 150 155 +1323 141  57 
-1898 157 145 +1324 151 156
-1899 155  57 +
-1900 145 164 +
-1901  57 162 +
-1902 164 141 +
-1903 162 151+
 --More-- --More--
 </code> </code>
Ligne 2618: Ligne 2689:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **cmp** command to view the command line switches. **To do** : Use the **--help** option of the **cmp** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The patch Command===+===7.10 - The patch Command===
  
-The **patch** command is used to apply modifications contained within a patch file to an older version of a file so that it becomes the newer version of the file.+La commande **patch** est utilisée pour appliquer des modifications à un fichier à partir d'un fichier patch qui contient les The **patch** command is used to apply modifications contained within a patch file to an older version of a file so that it becomes the newer version of the file.
  
-The **patch** command is not installed by default in RHEL/CentOS 7:+The **patch** command is not installed by default in RHEL/CentOS 8:
  
 <code> <code>
-[root@centos7 ~]# yum install patch +[root@centos8 ~]# dnf install patch -y
-Loaded plugins: fastestmirror, langpacks +
-Loading mirror speeds from cached hostfile +
- * base: mirror.ibcp.fr +
- * extras: mirrors.atosworldline.com +
- * updates: mirror.ibcp.fr +
-Resolving Dependencies +
---> Running transaction check +
----> Package patch.x86_64 0:2.7.1-8.el7 will be installed +
---> Finished Dependency Resolution +
- +
-Dependencies Resolved +
- +
-====================================================================================================================================================== +
- Package                           Arch                               Version                                  Repository                        Size +
-====================================================================================================================================================== +
-Installing: +
- patch                             x86_64                             2.7.1-8.el7                              base                             110 k +
- +
-Transaction Summary +
-====================================================================================================================================================== +
-Install  1 Package +
- +
-Total download size: 110 k +
-Installed size: 210 k +
-Is this ok [y/d/N]: y +
-Downloading packages: +
-patch-2.7.1-8.el7.x86_64.rpm                                                                                                   | 110 kB  00:00:00      +
-Running transaction check +
-Running transaction test +
-Transaction test succeeded +
-Running transaction +
-  Installing : patch-2.7.1-8.el7.x86_64                                                                                                           1/1  +
-  Verifying  : patch-2.7.1-8.el7.x86_64                                                                                                           1/1  +
- +
-Installed: +
-  patch.x86_64 0:2.7.1-8.el7                                                                                                                           +
- +
-Complete!+
 </code> </code>
  
-If you recall, you made some changes to the original **greptest** file that you downloaded:+If you recall, you made some changes to the /tmp/greptest et /tmp/greptest1 files:
  
 <code> <code>
-[root@centos7 ~]# cat /tmp/greptest+[root@centos8 tmp]# cat /tmp/greptest
 # Starting comment # Starting comment
 ^ This line will be used to demonstrate the use of fgrep ^ This line will be used to demonstrate the use of fgrep
Ligne 2688: Ligne 2721:
 £ £
 # End comment # End comment
-</code> +[root@centos8 tmp]# cat /tmp/greptest1
- +
-You also used egrep to remove all the comments and empty lines and save the result to **/tmp/greptest1**:  +
- +
-<code> +
-[root@centos ~]# cat /tmp/greptest1+
 fenestrOS fenestrOS
 fenestros fenestros
Ligne 2706: Ligne 2734:
  
 <code> <code>
-[root@centos7 ~]# cd /tmp +[root@centos8 tmp]# diff -u greptest greptest1 > greptest.patch
-[root@centos7 tmp]# diff -u greptest greptest1 > greptest.patch+
 </code> </code>
  
Ligne 2713: Ligne 2740:
  
 <code> <code>
-[root@centos tmp]# cat /tmp/greptest.patch +[root@centos8 tmp]# cat greptest.patch 
---- greptest 2013-01-07 15:14:03.646565259 +0100 +--- greptest 2021-04-20 05:23:52.710188632 -0400 
-+++ greptest1 2013-01-07 15:07:05.657375635 +0100++++ greptest1 2021-04-20 05:21:55.189882834 -0400
 @@ -1,14 +1,7 @@ @@ -1,14 +1,7 @@
 -# Starting comment -# Starting comment
Ligne 2736: Ligne 2763:
  
 <code> <code>
-[root@centos7 tmp]# patch < greptest.patch+[root@centos8 tmp]# patch < greptest.patch
 patching file greptest patching file greptest
 </code> </code>
Ligne 2743: Ligne 2770:
  
 <code> <code>
-[root@centos7 tmp]# cat greptest+[root@centos8 tmp]# cat greptest
 fenestrOS fenestrOS
 fenestros fenestros
Ligne 2755: Ligne 2782:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **patch** command to view the command line switches. **To do** : Use the **--help** option of the **patch** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The strings Command===+===7.11 - The strings Command===
  
 The **strings** Command is used to extract any printable string in one or more object files or executables. An object fie is an intermediary file used when compiling. The **strings** Command is used to extract any printable string in one or more object files or executables. An object fie is an intermediary file used when compiling.
Ligne 2772: Ligne 2799:
  
 <code> <code>
-[root@centos7 tmp]# strings /usr/bin/passwd | more+[root@centos8 tmp]# strings /usr/bin/passwd | more
 /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
-{1~` 
 libuser.so.1 libuser.so.1
 g_value_get_int64 g_value_get_int64
Ligne 2781: Ligne 2807:
 g_free g_free
 g_value_array_get_nth g_value_array_get_nth
 +audit_open
 __gmon_start__ __gmon_start__
 g_value_get_string g_value_get_string
 g_type_check_value_holds g_type_check_value_holds
 g_value_get_long g_value_get_long
-_Jv_RegisterClasses 
 freecon freecon
 +audit_log_acct_message
 _ITM_registerTMCloneTable _ITM_registerTMCloneTable
 lu_ent_set_string lu_ent_set_string
Ligne 2792: Ligne 2819:
 lu_error_free lu_error_free
 lu_user_lock lu_user_lock
-_fini 
-_init 
 lu_strerror lu_strerror
 lu_ent_free lu_ent_free
 lu_ent_new lu_ent_new
 lu_user_modify lu_user_modify
-lu_prompt_console 
-lu_start 
-lu_user_lookup_name 
 --More-- --More--
 </code> </code>
Ligne 2807: Ligne 2829:
  
 <code> <code>
-[root@centos7 tmp]# strings -t d /usr/bin/passwd | more +[root@centos8 tmp]# strings -t d /usr/bin/passwd | more 
-    568 /lib64/ld-linux-x86-64.so.2 +    624 /lib64/ld-linux-x86-64.so.2 
-    648 {1~` +   2809 libuser.so.1 
-   2833 libuser.so.1 +   2822 g_value_get_int64 
-   2846 g_value_get_int64 +   2840 is_selinux_enabled 
-   2864 is_selinux_enabled +   2859 _ITM_deregisterTMCloneTable 
-   2883 _ITM_deregisterTMCloneTable +   2887 g_free 
-   2911 g_free +   2894 g_value_array_get_nth 
-   2918 g_value_array_get_nth +   2916 audit_open 
-   2940 __gmon_start__ +   2927 __gmon_start__ 
-   2955 g_value_get_string +   2942 g_value_get_string 
-   2974 g_type_check_value_holds +   2961 g_type_check_value_holds 
-   2999 g_value_get_long +   2986 g_value_get_long 
-   3016 _Jv_RegisterClasses +   3003 freecon 
-   3036 freecon +   3011 audit_log_acct_message 
-   3044 _ITM_registerTMCloneTable +   3034 _ITM_registerTMCloneTable 
-   3070 lu_ent_set_string +   3060 lu_ent_set_string 
-   3088 lu_ent_get_first_value_strdup +   3078 lu_ent_get_first_value_strdup 
-   3118 lu_error_free +   3108 lu_error_free 
-   3132 lu_user_lock +   3122 lu_user_lock 
-   3145 _fini +   3135 lu_strerror 
-   3151 _init +   3147 lu_ent_free 
-   3157 lu_strerror +   3159 lu_ent_new 
-   3169 lu_ent_free +   3170 lu_user_modify
-   3181 lu_ent_new +
-   3192 lu_user_modify +
-   3207 lu_prompt_console +
-   3225 lu_start +
-   3234 lu_user_lookup_name+
 --More-- --More--
 </code> </code>
Ligne 2849: Ligne 2866:
  
 <code> <code>
-[root@centos7 tmp]# strings -t d -n 15 /usr/bin/passwd | more +[root@centos8 tmp]# strings -t d -n 15 /usr/bin/passwd | more 
-    568 /lib64/ld-linux-x86-64.so.2 +    624 /lib64/ld-linux-x86-64.so.2 
-   2846 g_value_get_int64 +   2822 g_value_get_int64 
-   2864 is_selinux_enabled +   2840 is_selinux_enabled 
-   2883 _ITM_deregisterTMCloneTable +   2859 _ITM_deregisterTMCloneTable 
-   2918 g_value_array_get_nth +   2894 g_value_array_get_nth 
-   2955 g_value_get_string +   2942 g_value_get_string 
-   2974 g_type_check_value_holds +   2961 g_type_check_value_holds 
-   2999 g_value_get_long +   2986 g_value_get_long 
-   3016 _Jv_RegisterClasses +   3011 audit_log_acct_message 
-   3044 _ITM_registerTMCloneTable +   3034 _ITM_registerTMCloneTable 
-   3070 lu_ent_set_string +   3060 lu_ent_set_string 
-   3088 lu_ent_get_first_value_strdup +   3078 lu_ent_get_first_value_strdup 
-   3207 lu_prompt_console +   3185 lu_prompt_console 
-   3234 lu_user_lookup_name +   3212 lu_user_lookup_name 
-   3261 lu_ent_set_long +   3239 lu_ent_set_long 
-   3303 lu_user_removepass +   3281 lu_user_removepass 
-   3322 libgobject-2.0.so.0 +   3300 libgobject-2.0.so.0 
-   3342 libglib-2.0.so.0 +   3320 libglib-2.0.so.0 
-   3372 poptSetOtherOptionHelp +   3379 poptHelpOptions 
-   3464 poptHelpOptions +   3435 poptSetOtherOptionHelp 
-   3503 audit_log_acct_message +   3543 libpam_misc.so.0 
-   3599 libpam_misc.so.0 +   3584 audit_log_user_avc_message 
-   3640 audit_log_user_avc_message +   3611 libselinux.so.1
-   3667 audit_log_user_message +
-   3690 libselinux.so.1 +
-   3706 selinux_set_callback +
-   3727 selinux_check_access +
-   3759 libpthread.so.0+
 --More-- --More--
 </code> </code>
Ligne 2884: Ligne 2896:
  
 <code> <code>
-[root@centos7 tmp]# strings -f /bin/* | grep "(c)"+[root@centos8 tmp]# strings -f /bin/* | grep "(c)" 
 +/bin/broadwayd:  * (c) Joel Martin (github@martintribe.org), used with permission 
 +/bin/broadwayd: /** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';var l=void 0,p=this;function q(c,d){var a=c.split("."),b=p;!(a[0]in b)&&b.execScript&&b.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)!a.length&&d!==l?b[e]=d:b=b[e]?b[e]:b[e]={}};var r="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array;function u(c){var d=c.length,a=0,b=Number.POSITIVE_INFINITY,e,f,g,h,k,m,s,n,t;for(n=0;n<d;++n)c[n]>a&&(a=c[n]),c[n]<b&&(b=c[n]);e=1<<a;f=new (r?Uint32Array:Array)(e);g=1;h=0;for(k=2;g<=a;){for(n=0;n<d;++n)if(c[n]===g){m=0;s=h;for(t=0;t<g;++t)m=m<<1|s&1,s>>=1;for(t=m;t<e;t+=k)f[t]=g<<16|n;++h}++g;h<<=1;k<<=1}return[f,a,b]};function v(c,d){this.g=[];this.h=32768;this.c=this.f=this.d=this.k=0;this.input=r?new Uint8Array(c):c;this.l=!1;this.i=w;this.p=!1;if(d||!(d={}))d.index&&(this.d=d.index),d.bufferSize&&(this.h=d.bufferSize),d.bufferType&&(this.i=d.bufferType),d.resize&&(this.p=d.resize);switch(this.i){case x:this.a=32768;this.b=new (r?Uint8Array:Array)(32768+this.h+258);break;case w:this.a=0;this.b=new (r?Uint8Array:Array)(this.h);this.e=this.u;this.m=this.r;this.j=this.s;break;default:throw Error("invalid inflate mode"); 
 +/bin/broadwayd: v.prototype.t=function(){for(;!this.l;){var c=y(this,3);c&1&&(this.l=!0);c>>>=1;switch(c){case 0:var d=this.input,a=this.d,b=this.b,e=this.a,f=l,g=l,h=l,k=b.length,m=l;this.c=this.f=0;f=d[a++];if(f===l)throw Error("invalid uncompressed block header: LEN (first byte)");g=f;f=d[a++];if(f===l)throw Error("invalid uncompressed block header: LEN (second byte)");g|=f<<8;f=d[a++];if(f===l)throw Error("invalid uncompressed block header: NLEN (first byte)");h=f;f=d[a++];if(f===l)throw Error("invalid uncompressed block header: NLEN (second byte)");h|= 
 +/bin/broadwayd: function B(c){function d(a,c,b){var d,f,e,g;for(g=0;g<a;)switch(d=S(this,c),d){case 16:for(e=3+y(this,2);e--;)b[g++]=f;break;case 17:for(e=3+y(this,3);e--;)b[g++]=0;f=0;break;case 18:for(e=11+y(this,7);e--;)b[g++]=0;f=0;break;default:f=b[g++]=d}return b}var a=y(c,5)+257,b=y(c,5)+1,e=y(c,4)+4,f=new (r?Uint8Array:Array)(D.length),g,h,k,m;for(m=0;m<e;++m)f[D[m]]=y(c,3);g=u(f);h=new (r?Uint8Array:Array)(a);k=new (r?Uint8Array:Array)(b);c.j(u(d.call(c,a,g,h)),u(d.call(c,b,g,k)))} 
 +/bin/broadwayd: v.prototype.e=function(){var c=new (r?Uint8Array:Array)(this.a-32768),d=this.a-32768,a,b,e=this.b;if(r)c.set(e.subarray(32768,c.length));else{a=0;for(b=c.length;a<b;++a)c[a]=e[a+32768]}this.g.push(c);this.k+=c.length;if(r)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];this.a=32768;return e}; 
 +/bin/broadwayd: v.prototype.u=function(c){var d,a=this.input.length/this.d+1|0,b,e,f,g=this.input,h=this.b;c&&("number"===typeof c.o&&(a=c.o),"number"===typeof c.q&&(a+=c.q));2>a?(b=(g.length-this.d)/this.n[2],f=258*(b/2)|0,e=f<h.length?h.length+f:h.length<<1):e=h.length*a;r?(d=new Uint8Array(e),d.set(h)):d=h;return this.b=d};
 /bin/btrace: # Copyright (c) 2005 Silicon Graphics, Inc. /bin/btrace: # Copyright (c) 2005 Silicon Graphics, Inc.
-/bin/cdda-player: (c) 1997,98 Gerd Knorr <kraxel@goldbach.in-berlin.de> +/bin/chcat:         if len(c) > 0 and (c[0] == "+" or c[0] == "-"):
-/bin/cdda-player: (c) 2005, 2006 Rocky Bernstein <rocky@gnu.org> +
-/bin/cd-drive: Copyright (c) 2003-2005, 2007-2008, 2011-2013 R. Bernstein +
-/bin/cd-info: Copyright (c) 2003-2005, 2007-2008, 2011-2013 R. Bernstein +
-/bin/cd-read: Copyright (c) 2003-2005, 2007-2008, 2011-2013 R. Bernstein +
-/bin/chcat:         if len(c) > 0 and ( c[0] == "+" or c[0] == "-" ):+
 /bin/chcat:                 if len(c) > 0 and c[0] == "+": /bin/chcat:                 if len(c) > 0 and c[0] == "+":
 /bin/chcat:                 if len(c) > 0 and c[0] == "-": /bin/chcat:                 if len(c) > 0 and c[0] == "-":
-/bin/crash:        (c) a pointer to the first item pointed to by the start address. 
-/bin/crash:        (c) a list_head that is embedded within a data structure that is 
-/bin/crash:                 switch(c) 
-/bin/csh: @(#) Copyright (c) 1991 The Regents of the University of California. 
-/bin/diffpp: # Copyright (c) 1996-1998 Markku Rossi 
-/bin/drill: Copyright (c) 2004-2008 NLnet Labs. 
-/bin/festival_server: ##                         Copyright (c) 1996                            ## 
-/bin/festival_server_control: ##                         Copyright (c) 1996                            ## 
-/bin/gcm-calibrate: Copyright (c) 
 /bin/gprof: @(#) Copyright (c) 1983 Regents of the University of California. /bin/gprof: @(#) Copyright (c) 1983 Regents of the University of California.
-/bin/hpijs: Copyright (c) 2001-2004, Hewlett-Packard Co. +/bin/lsusb.py: # Copyright (c) 2009 Kurt Garloff <garloff@suse.de
-/bin/ibus-setup: # Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com> +/bin/lsusb.py:Copyright (c) 2013 Kurt Garloff <kurt@garloff.de>
-/bin/ibus-setup: # Copyright (c) 2007-2010 Red Hat, Inc. +
-/bin/ibus-table-createdb: # Copyright (c) 2008-2009 Yu Yuwei <acevery@gmail.com> +
-/bin/iso-info: Copyright (c) 2003-2005, 2007-2008, 2011-2013 R. Bernstein +
-/bin/iso-read: Copyright (c) 2003-2005, 2007-2008, 2011-2013 R. Bernstein +
-/bin/lsusb.py: # (c) Kurt Garloff <garloff@suse.de>, 2/2009, GPL v2 or v3. +
-/bin/mmc-tool: Copyright (c) 2003-2005, 2007-2008, 2011-2013 R. Bernstein +
-/bin/orca: __copyright__ = "Copyright (c) 2010-2012 The Orca Team" \ +
-/bin/orca:                 "Copyright (c) 2012 Igalia, S.L."+
 /bin/pinentry: # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. /bin/pinentry: # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
 /bin/pinentry: # Copyright (c) 2009 Fedora Project /bin/pinentry: # Copyright (c) 2009 Fedora Project
-/bin/ping@(#Copyright (c) 1989 The Regents of the University of California. +/bin/pinentry: # Copyright (c) 2014-2015 Red Hat 
-/bin/ping6@(#) Copyright (c) 1989 The Regents of the University of California.+/bin/pkgconfCopyright (c2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 
 +/bin/pkg-config: Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
 /bin/pod2usage: # Copyright (c) 1996-2000 by Bradford Appleton. All rights reserved. /bin/pod2usage: # Copyright (c) 1996-2000 by Bradford Appleton. All rights reserved.
-/bin/qemu-imgqemu-img version 1.5.3, Copyright (c) 2004-2008 Fabrice Bellard +/bin/pod2usageCopyright (c) 2001-2016 by Marek Rouchal. 
-/bin/repoclosure# seth vidal 2005 (c) etc etc +/bin/qemu-imgCopyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers 
-/bin/repodiff(c) 2007 Red Hat. Written by skvidal@fedoraproject.org +/bin/qemu-imgCopyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers 
-/bin/repo-graph(c) 2005 Panu Matilainen <pmatilai@laiskiainen.org> +/bin/qemu-ioCopyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers 
-/bin/repomanage(c) Copyright Seth Vidal 2004 +/bin/qemu-nbdCopyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers 
-/bin/repoquery(c) pmatilai@laiskiainen.org +/bin/qemu-pr-helperCopyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers 
-/bin/repo-rss: # seth vidal 2005 (c) etc etc +/bin/rescan-scsi-bus.sh: # (c) 1998--2010 Kurt Garloff <kurt@garloff.de>, GNU GPL v2 or v3 
-/bin/repotrack: # (c) 2005 seth vidal skvidal at phy.duke.edu+/bin/rescan-scsi-bus.sh: # (c) 2006--2018 Hannes Reinecke, GNU GPL v2 or later
 /bin/rngtest: Copyright (c) 2004 by Henrique de Moraes Holschuh /bin/rngtest: Copyright (c) 2004 by Henrique de Moraes Holschuh
-/bin/saytime;;                       Copyright (c) 1996,1997                         ;; +/bin/screen: Copyright (c) 2015-2017 Juergen WeigertAlexander Naumov, Amadeusz Slawinski 
-/bin/sbcdec: Copyright (c) 2004-2010  Marcel Holtmann +/bin/screen: Copyright (c) 2010-2014 Juergen Weigert, Sadrul Habib Chowdhury 
-/bin/sbcenc: Copyright (c) 2004-2010  Marcel Holtmann +/bin/screen: Copyright (c) 2008-2009 Juergen Weigert, Michael Schroeder, Micah Cowan, Sadrul Habib Chowdhury 
-/bin/screen: Copyright (c) 2010 Juergen Weigert, Sadrul Habib Chowdhury +/bin/screen: Copyright (c) 1993-2007 Juergen Weigert, Michael Schroeder
-/bin/screen: Copyright (c) 20082009 Juergen Weigert, Michael Schroeder, Micah Cowan, Sadrul Habib Chowdhury +
-/bin/screen: Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 Juergen Weigert, Michael Schroeder+
 /bin/screen: Copyright (c) 1987 Oliver Laumann /bin/screen: Copyright (c) 1987 Oliver Laumann
-/bin/sliceprint: # Copyright (c) 1996-1999 Markku Rossi +/bin/scsi-rescan: # (c) 1998--2010 Kurt Garloff <kurt@garloff.de>, GNU GPL v2 or v3 
-/bin/soundstretch    Copyright (c) Olli Parviainen +/bin/scsi-rescan(c) 2006--2018 Hannes Reinecke, GNU GPL v2 or later 
-/bin/ssh-copy-id: # Copyright (c) 1999-2013 Philip Hands <phil@hands.com> +/bin/sg_test_rwbuf: (c) Douglas Gilbert, Kurt Garloff, 2000-2007, GNU GPL 
-/bin/tcptraceroute#   Copyright (c)  2007             Dmitry Butskoy +/bin/slabinfo: slabinfo 4/15/2011. (c) 2007 sgi/(c) 2011 Linux Foundation. 
-/bin/tcsh@(#Copyright (c) 1991 The Regents of the University of California+/bin/ssh-copy-id: # Copyright (c) 1999-2016 Philip Hands <phil@hands.com> 
-/bin/text2wave;;                       Copyright (c) 1996,1997                         ;; +/bin/strace: Copyright (c) 1991-%s The strace developers <%s>. 
-/bin/traceroute: Copyright (c2008  Dmitry Butskoy  License: GPL v2 or any later +/bin/strace-log-merge: # Copyright (c) 2012-2019 The strace developers
-/bin/traceroute6: Copyright (c) 2008  Dmitry Butskoy,   License: GPL v2 or any later +/bin/systemd-analyzehashmap_update(*uid_refsUID_TO_PTR(uid), UINT32_TO_PTR(c)) >= 0 
-/bin/verifytree: # copyright (c2008 Red Hat, Inc - written by Seth Vidal and Will Woods +/bin/tree$Version: $ tree v1.7.(c) 1996 2014 by Steve BakerThomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro $ 
-/bin/wavpack Copyright (c) 1998 - 2009 Conifer Software All Rights Reserved. +/bin/usb-devicesCopyright (c) 2009 Greg Kroah-Hartman <greg@kroah.com> 
-/bin/wvdial: Copyright (c) 1997-2005 Net Integration TechnologiesInc. +/bin/usb-devicesCopyright (c) 2009 Randy Dunlap <rdunlap@xenotime.net> 
-/bin/wvdialconf: Copyright (c) 1997-2005 Net Integration Technologies, Inc+/bin/usb-devicesCopyright (c) 2009 Frans Pop <elendil@planet.nl> 
-/bin/wvgain Copyright (c) 2005 - 2009 Conifer Software.  All Rights Reserved+/bin/vdo: # Copyright (c) 2020 Red Hat, Inc
-/bin/wvunpack Copyright (c) 1998 - 2009 Conifer Software.  All Rights Reserved+/bin/vdo-by-dev: # Copyright (c) 2020 Red Hat, Inc
-/bin/yum-debug-dump: #(c) 2008 Red Hat. Written by skvidal@fedoraproject.org +/bin/vdostats# Copyright (c) 2020 Red Hat, Inc.
-/bin/yum-debug-restore: #(c) 2008 Red Hat. Written by skvidal@fedoraproject.org +
-/bin/zipight (c)H+
 /bin/zip: Copyright (c) 1990-2008 Info-ZIP.  All rights reserved. /bin/zip: Copyright (c) 1990-2008 Info-ZIP.  All rights reserved.
 /bin/zip: Copyright (c) 1990-2008 Info-ZIP - Type '%s "-L"' for software license. /bin/zip: Copyright (c) 1990-2008 Info-ZIP - Type '%s "-L"' for software license.
 +/bin/zip:     bzip2 code and library copyright (c) Julian     (See the bzip2 license for t
 /bin/zipcloak: Copyright (c) 1990-2008 Info-ZIP.  All rights reserved. /bin/zipcloak: Copyright (c) 1990-2008 Info-ZIP.  All rights reserved.
 /bin/zipcloak: Copyright (c) 1990-2008 Info-ZIP - Type '%s "-L"' for software license. /bin/zipcloak: Copyright (c) 1990-2008 Info-ZIP - Type '%s "-L"' for software license.
Ligne 2964: Ligne 2958:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **strings** command to view the command line switches. **To do** : Use the **--help** option of the **strings** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The comm Command===+===7.12 - The comm Command===
  
 This command compares two text files and prints the differences to standard output: This command compares two text files and prints the differences to standard output:
  
 <code> <code>
-[root@centos7 tmp]# comm /etc/passwd /root/passwd+[root@centos8 tmp]# comm /etc/passwd /root/passwd
  root:x:0:0:root:/root:/bin/bash  root:x:0:0:root:/root:/bin/bash
  bin:x:1:1:bin:/bin:/sbin/nologin  bin:x:1:1:bin:/bin:/sbin/nologin
Ligne 2986: Ligne 2980:
  games:x:12:100:games:/usr/games:/sbin/nologin  games:x:12:100:games:/usr/games:/sbin/nologin
  ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin  ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
- nobody:x:99:99:Nobody:/:/sbin/nologin+ nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin
  dbus:x:81:81:System message bus:/:/sbin/nologin  dbus:x:81:81:System message bus:/:/sbin/nologin
- polkitd:x:999:998:User for polkitd:/:/sbin/nologin + systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin 
- unbound:x:998:997:Unbound DNS resolver:/etc/unbound:/sbin/nologin + systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin 
- colord:x:997:996:User for colord:/var/lib/colord:/sbin/nologin + tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin 
- usbmuxd:x:113:113:usbmuxd user:/:/sbin/nologin + polkitd:x:998:996:User for polkitd:/:/sbin/nologin 
- avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin + unbound:x:997:994:Unbound DNS resolver:/etc/unbound:/sbin/nologin 
- avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin + libstoragemgmt:x:996:993:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin 
- saslauth:x:996:76:"Saslauthd user":/run/saslauthd:/sbin/nologin + cockpit-ws:x:995:991:User for cockpit-ws:/nonexisting:/sbin/nologin 
- qemu:x:107:107:qemu user:/:/sbin/nologin + sssd:x:994:990:User for sssd:/:/sbin/nologin 
- libstoragemgmt:x:995:994:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin + setroubleshoot:x:993:989::/var/lib/setroubleshoot:/sbin/nologin
- rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin +
- rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin +
- nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin +
- rtkit:x:172:172:RealtimeKit:/proc:/sbin/nologin +
- radvd:x:75:75:radvd user:/:/sbin/nologin +
- ntp:x:38:38::/etc/ntp:/sbin/nologin +
- chrony:x:994:993::/var/lib/chrony:/sbin/nologin +
- abrt:x:173:173::/etc/abrt:/sbin/nologin +
- pulse:x:171:171:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin +
- gdm:x:42:42::/var/lib/gdm:/sbin/nologin +
- gnome-initial-setup:x:993:991::/run/gnome-initial-setup/:/sbin/nologin +
- postfix:x:89:89::/var/spool/postfix:/sbin/nologin+
  sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin  sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
- tcpdump:x:72:72::/:/sbin/nologin+ chrony:x:992:988::/var/lib/chrony:/sbin/nologin 
 +tcpdump:x:72:72::/:/sbin/nologin
  trainee10:x:1000:1000:trainee:/home/trainee:/bin/bash  trainee10:x:1000:1000:trainee:/home/trainee:/bin/bash
-trainee:x:1000:1000:trainee:/home/trainee:/bin/bash 
- tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin 
 comm: file 2 is not in sorted order comm: file 2 is not in sorted order
 + cockpit-wsinstance:x:991:987:User for cockpit-ws instances:/nonexisting:/sbin/nologin
 + rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin
 + gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin
 + qemu:x:107:107:qemu user:/:/sbin/nologin
 + rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
 + rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
 + saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin
 + radvd:x:75:75:radvd user:/:/sbin/nologin
 + dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin
  Linux est super!  Linux est super!
-vboxadd:x:992:1::/var/run/vboxadd:/bin/false+trainee:x:1000:1000:trainee:/home/trainee:/bin/bash
 comm: file 1 is not in sorted order comm: file 1 is not in sorted order
-tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin+cockpit-wsinstance:x:991:987:User for cockpit-ws instances:/nonexisting:/sbin/nologin 
 +rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin 
 +gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin 
 +qemu:x:107:107:qemu user:/:/sbin/nologin 
 +rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin 
 +rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin 
 +saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin 
 +radvd:x:75:75:radvd user:/:/sbin/nologin 
 +dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin
 </code> </code>
  
Ligne 3028: Ligne 3026:
  
 <code> <code>
-[root@centos7 tmp]# comm -12 /etc/passwd /root/passwd+[root@centos8 tmp]# comm -12 /etc/passwd /root/passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 bin:x:1:1:bin:/bin:/sbin/nologin bin:x:1:1:bin:/bin:/sbin/nologin
Ligne 3041: Ligne 3039:
 games:x:12:100:games:/usr/games:/sbin/nologin games:x:12:100:games:/usr/games:/sbin/nologin
 ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
-nobody:x:99:99:Nobody:/:/sbin/nologin+nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin
 dbus:x:81:81:System message bus:/:/sbin/nologin dbus:x:81:81:System message bus:/:/sbin/nologin
-polkitd:x:999:998:User for polkitd:/:/sbin/nologin +systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin 
-unbound:x:998:997:Unbound DNS resolver:/etc/unbound:/sbin/nologin +systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin 
-colord:x:997:996:User for colord:/var/lib/colord:/sbin/nologin +tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin 
-usbmuxd:x:113:113:usbmuxd user:/:/sbin/nologin +polkitd:x:998:996:User for polkitd:/:/sbin/nologin 
-avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin +unbound:x:997:994:Unbound DNS resolver:/etc/unbound:/sbin/nologin 
-avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin +libstoragemgmt:x:996:993:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin 
-saslauth:x:996:76:"Saslauthd user":/run/saslauthd:/sbin/nologin +cockpit-ws:x:995:991:User for cockpit-ws:/nonexisting:/sbin/nologin 
-qemu:x:107:107:qemu user:/:/sbin/nologin +sssd:x:994:990:User for sssd:/:/sbin/nologin 
-libstoragemgmt:x:995:994:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin +setroubleshoot:x:993:989::/var/lib/setroubleshoot:/sbin/nologin
-rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin +
-rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin +
-nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin +
-rtkit:x:172:172:RealtimeKit:/proc:/sbin/nologin +
-radvd:x:75:75:radvd user:/:/sbin/nologin +
-ntp:x:38:38::/etc/ntp:/sbin/nologin +
-chrony:x:994:993::/var/lib/chrony:/sbin/nologin +
-abrt:x:173:173::/etc/abrt:/sbin/nologin +
-pulse:x:171:171:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin +
-gdm:x:42:42::/var/lib/gdm:/sbin/nologin +
-gnome-initial-setup:x:993:991::/run/gnome-initial-setup/:/sbin/nologin +
-postfix:x:89:89::/var/spool/postfix:/sbin/nologin+
 sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
-tcpdump:x:72:72::/:/sbin/nologin+chrony:x:992:988::/var/lib/chrony:/sbin/nologin
 comm: file 2 is not in sorted order comm: file 2 is not in sorted order
 comm: file 1 is not in sorted order comm: file 1 is not in sorted order
Ligne 3072: Ligne 3058:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **comm** command to view the command line switches. **To do** : Use the **--help** option of the **comm** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The head Command===+===7.13 - The head Command===
  
 The **head** command is used to display the first **x** lines of a file. The default value of x is 10: The **head** command is used to display the first **x** lines of a file. The default value of x is 10:
  
 <code> <code>
-[root@centos7 tmp]# head /etc/passwd+[root@centos8 tmp]# head /etc/passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 bin:x:1:1:bin:/bin:/sbin/nologin bin:x:1:1:bin:/bin:/sbin/nologin
Ligne 3097: Ligne 3083:
  
 <code> <code>
-[root@centos7 tmp]# head -n 15 /etc/passwd+[root@centos8 tmp]# head -n 15 /etc/passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 bin:x:1:1:bin:/bin:/sbin/nologin bin:x:1:1:bin:/bin:/sbin/nologin
Ligne 3110: Ligne 3096:
 games:x:12:100:games:/usr/games:/sbin/nologin games:x:12:100:games:/usr/games:/sbin/nologin
 ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
-nobody:x:99:99:Nobody:/:/sbin/nologin+nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin
 dbus:x:81:81:System message bus:/:/sbin/nologin dbus:x:81:81:System message bus:/:/sbin/nologin
-polkitd:x:999:998:User for polkitd:/:/sbin/nologin+systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin
 </code> </code>
  
Ligne 3118: Ligne 3104:
  
 <code> <code>
-[root@centos7 tmp]# head -c 150 /etc/passwd+[root@centos8 tmp]# head -c 150 /etc/passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 bin:x:1:1:bin:/bin:/sbin/nologin bin:x:1:1:bin:/bin:/sbin/nologin
 daemon:x:2:2:daemon:/sbin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin
 adm:x:3:4:adm:/var/adm:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin
-lp:x:4:7[root@centos7 tmp]#  +lp:x:4:7[root@centos8 tmp]# 
 </code> </code>
  
Ligne 3129: Ligne 3115:
  
 <code> <code>
-lp:x:4:7[root@centos7 tmp]# head -c -150 /etc/passwd+[root@centos8 tmp]# head -c -150 /etc/passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 bin:x:1:1:bin:/bin:/sbin/nologin bin:x:1:1:bin:/bin:/sbin/nologin
Ligne 3142: Ligne 3128:
 games:x:12:100:games:/usr/games:/sbin/nologin games:x:12:100:games:/usr/games:/sbin/nologin
 ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
-nobody:x:99:99:Nobody:/:/sbin/nologin+nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin
 dbus:x:81:81:System message bus:/:/sbin/nologin dbus:x:81:81:System message bus:/:/sbin/nologin
-polkitd:x:999:998:User for polkitd:/:/sbin/nologin +systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin 
-unbound:x:998:997:Unbound DNS resolver:/etc/unbound:/sbin/nologin +systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin 
-colord:x:997:996:User for colord:/var/lib/colord:/sbin/nologin +tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin 
-usbmuxd:x:113:113:usbmuxd user:/:/sbin/nologin +polkitd:x:998:996:User for polkitd:/:/sbin/nologin 
-avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin +unbound:x:997:994:Unbound DNS resolver:/etc/unbound:/sbin/nologin 
-avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin +libstoragemgmt:x:996:993:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin 
-saslauth:x:996:76:"Saslauthd user":/run/saslauthd:/sbin/nologin+cockpit-ws:x:995:991:User for cockpit-ws:/nonexisting:/sbin/nologin 
 +sssd:x:994:990:User for sssd:/:/sbin/nologin 
 +setroubleshoot:x:993:989::/var/lib/setroubleshoot:/sbin/nologin 
 +sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin 
 +chrony:x:992:988::/var/lib/chrony:/sbin/nologin 
 +tcpdump:x:72:72::/:/sbin/nologin 
 +trainee:x:1000:1000:trainee:/home/trainee:/bin/bash 
 +cockpit-wsinstance:x:991:987:User for cockpit-ws instances:/nonexisting:/sbin/nologin 
 +rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin 
 +gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin
 qemu:x:107:107:qemu user:/:/sbin/nologin qemu:x:107:107:qemu user:/:/sbin/nologin
-libstoragemgmt:x:995:994:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin 
 rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
 rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
-nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin +saslauth:x:988:76:Saslauthd us[root@centos8 tmp]# 
-rtkit:x:172:172:RealtimeKit:/proc:/sbin/nologin +
-radvd:x:75:75:radvd user:/:/sbin/nologin +
-ntp:x:38:38::/etc/ntp:/sbin/nologin +
-chrony:x:994:993::/var/lib/chrony:/sbin/nologin +
-abrt:x:173:173::/etc/abrt:/sbin/nologin +
-pulse:x:171:171:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin +
-gdm:x:42:42::/var/lib/gdm:/sbin/nologin +
-gnome-initial-setup:x:993:991::/run/gnome-initial-setup/:/sbin/nologin +
-postfix:x:89:89::/var/spool/postfix:/sbin/nologin +
-sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin +
-tcpdump:x:72:72::/:/sbin/nologin +
-trainee:x:1000:1000:trainee:/home/trainee:/bin/[root@centos7 tmp]# +
 </code> </code>
  
Ligne 3173: Ligne 3155:
  
 <code> <code>
-[root@centos7 tmp]# head -c 1b /etc/passwd+[root@centos8 tmp]# head -c 1b /etc/passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 bin:x:1:1:bin:/bin:/sbin/nologin bin:x:1:1:bin:/bin:/sbin/nologin
Ligne 3186: Ligne 3168:
 games:x:12:100:games:/usr/games:/sbin/nologin games:x:12:100:games:/usr/games:/sbin/nologin
 ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
-nobody:x:99:99:Nobody:/:/sbin/nologin[root@centos7 tmp]#  +nobody:x:65534:65534:Kernel Overflow [root@centos8 tmp]#  
-[root@centos7 tmp]# head -c 512 /etc/passwd+ 
 +[root@centos8 tmp]# head -c 512 /etc/passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 bin:x:1:1:bin:/bin:/sbin/nologin bin:x:1:1:bin:/bin:/sbin/nologin
Ligne 3200: Ligne 3183:
 games:x:12:100:games:/usr/games:/sbin/nologin games:x:12:100:games:/usr/games:/sbin/nologin
 ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
-nobody:x:99:99:Nobody:/:/sbin/nologin[root@centos7 tmp]#+nobody:x:65534:65534:Kernel Overflow [root@centos8 tmp]# 
 </code> </code>
  
Ligne 3216: Ligne 3199:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **head** command to view the command line switches. **To do** : Use the **--help** option of the **head** command to view the command line switches.
 </WRAP> </WRAP>
  
-===The tail Command===+===7.14 - The tail Command===
  
 The **tail** command is used to display the last **x** lines of a file. The default value of x is 10: The **tail** command is used to display the last **x** lines of a file. The default value of x is 10:
  
 <code> <code>
-[root@centos7 tmp]# tail /etc/passwd +[root@centos8 tmp]# tail /etc/passwd
-abrt:x:173:173::/etc/abrt:/sbin/nologin +
-pulse:x:171:171:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin +
-gdm:x:42:42::/var/lib/gdm:/sbin/nologin +
-gnome-initial-setup:x:993:991::/run/gnome-initial-setup/:/sbin/nologin +
-postfix:x:89:89::/var/spool/postfix:/sbin/nologin +
-sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin +
-tcpdump:x:72:72::/:/sbin/nologin+
 trainee:x:1000:1000:trainee:/home/trainee:/bin/bash trainee:x:1000:1000:trainee:/home/trainee:/bin/bash
-vboxadd:x:992:1::/var/run/vboxadd:/bin/false +cockpit-wsinstance:x:991:987:User for cockpit-ws instances:/nonexisting:/sbin/nologin 
-tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin+rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin 
 +gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin 
 +qemu:x:107:107:qemu user:/:/sbin/nologin 
 +rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin 
 +rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin 
 +saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin 
 +radvd:x:75:75:radvd user:/:/sbin/nologin 
 +dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin
 </code> </code>
  
Ligne 3241: Ligne 3224:
  
 <code> <code>
-[root@centos7 tmp]# tail -n 15 /etc/passwd +root@centos8 tmp]# tail -n 15 /etc/passwd 
-nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin +sssd:x:994:990:User for sssd:/:/sbin/nologin 
-rtkit:x:172:172:RealtimeKit:/proc:/sbin/nologin +setroubleshoot:x:993:989::/var/lib/setroubleshoot:/sbin/nologin
-radvd:x:75:75:radvd user:/:/sbin/nologin +
-ntp:x:38:38::/etc/ntp:/sbin/nologin +
-chrony:x:994:993::/var/lib/chrony:/sbin/nologin +
-abrt:x:173:173::/etc/abrt:/sbin/nologin +
-pulse:x:171:171:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin +
-gdm:x:42:42::/var/lib/gdm:/sbin/nologin +
-gnome-initial-setup:x:993:991::/run/gnome-initial-setup/:/sbin/nologin +
-postfix:x:89:89::/var/spool/postfix:/sbin/nologin+
 sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
 +chrony:x:992:988::/var/lib/chrony:/sbin/nologin
 tcpdump:x:72:72::/:/sbin/nologin tcpdump:x:72:72::/:/sbin/nologin
 trainee:x:1000:1000:trainee:/home/trainee:/bin/bash trainee:x:1000:1000:trainee:/home/trainee:/bin/bash
-vboxadd:x:992:1::/var/run/vboxadd:/bin/false +cockpit-wsinstance:x:991:987:User for cockpit-ws instances:/nonexisting:/sbin/nologin 
-tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin+rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin 
 +gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin 
 +qemu:x:107:107:qemu user:/:/sbin/nologin 
 +rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin 
 +rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin 
 +saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin 
 +radvd:x:75:75:radvd user:/:/sbin/nologin 
 +dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin
 </code> </code>
  
Ligne 3262: Ligne 3245:
  
 <code> <code>
-[root@centos7 tmp]# tail -c 150 /etc/passwd +[root@centos8 tmp]# tail -c 150 /etc/passwd 
-bash +er:/run/saslauthd:/sbin/nologin 
-vboxadd:x:992:1::/var/run/vboxadd:/bin/false +radvd:x:75:75:radvd user:/:/sbin/nologin 
-tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin+dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin
 </code> </code>
  
Ligne 3271: Ligne 3254:
  
 <code> <code>
-[root@centos7 tmp]# tail -c +150 /etc/passwd+[root@centos8 tmp]# tail -c +150 /etc/passwd
 7:lp:/var/spool/lpd:/sbin/nologin 7:lp:/var/spool/lpd:/sbin/nologin
 sync:x:5:0:sync:/sbin:/bin/sync sync:x:5:0:sync:/sbin:/bin/sync
Ligne 3280: Ligne 3263:
 games:x:12:100:games:/usr/games:/sbin/nologin games:x:12:100:games:/usr/games:/sbin/nologin
 ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
-nobody:x:99:99:Nobody:/:/sbin/nologin+nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin
 dbus:x:81:81:System message bus:/:/sbin/nologin dbus:x:81:81:System message bus:/:/sbin/nologin
-polkitd:x:999:998:User for polkitd:/:/sbin/nologin +systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin 
-unbound:x:998:997:Unbound DNS resolver:/etc/unbound:/sbin/nologin +systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin 
-colord:x:997:996:User for colord:/var/lib/colord:/sbin/nologin +tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin 
-usbmuxd:x:113:113:usbmuxd user:/:/sbin/nologin +polkitd:x:998:996:User for polkitd:/:/sbin/nologin 
-avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin +unbound:x:997:994:Unbound DNS resolver:/etc/unbound:/sbin/nologin 
-avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin +libstoragemgmt:x:996:993:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin 
-saslauth:x:996:76:"Saslauthd user":/run/saslauthd:/sbin/nologin+cockpit-ws:x:995:991:User for cockpit-ws:/nonexisting:/sbin/nologin 
 +sssd:x:994:990:User for sssd:/:/sbin/nologin 
 +setroubleshoot:x:993:989::/var/lib/setroubleshoot:/sbin/nologin 
 +sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin 
 +chrony:x:992:988::/var/lib/chrony:/sbin/nologin 
 +tcpdump:x:72:72::/:/sbin/nologin 
 +trainee:x:1000:1000:trainee:/home/trainee:/bin/bash 
 +cockpit-wsinstance:x:991:987:User for cockpit-ws instances:/nonexisting:/sbin/nologin 
 +rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin 
 +gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin
 qemu:x:107:107:qemu user:/:/sbin/nologin qemu:x:107:107:qemu user:/:/sbin/nologin
-libstoragemgmt:x:995:994:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin 
 rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
 rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
-nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin +saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin
-rtkit:x:172:172:RealtimeKit:/proc:/sbin/nologin+
 radvd:x:75:75:radvd user:/:/sbin/nologin radvd:x:75:75:radvd user:/:/sbin/nologin
-ntp:x:38:38::/etc/ntp:/sbin/nologin +dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin
-chrony:x:994:993::/var/lib/chrony:/sbin/nologin +
-abrt:x:173:173::/etc/abrt:/sbin/nologin +
-pulse:x:171:171:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin +
-gdm:x:42:42::/var/lib/gdm:/sbin/nologin +
-gnome-initial-setup:x:993:991::/run/gnome-initial-setup/:/sbin/nologin +
-postfix:x:89:89::/var/spool/postfix:/sbin/nologin +
-sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin +
-tcpdump:x:72:72::/:/sbin/nologin +
-trainee:x:1000:1000:trainee:/home/trainee:/bin/bash +
-vboxadd:x:992:1::/var/run/vboxadd:/bin/false +
-tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin+
 </code> </code>
  
Ligne 3313: Ligne 3292:
  
 <code> <code>
-[root@centos7 tmp]# tail -c 1b /etc/passwd +[root@centos8 tmp]# tail -c 1b /etc/passwd 
-PulseAudio System Daemon:/var/run/pulse:/sbin/nologin +nstances:/nonexisting:/sbin/nologin 
-gdm:x:42:42::/var/lib/gdm:/sbin/nologin +rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin 
-gnome-initial-setup:x:993:991::/run/gnome-initial-setup/:/sbin/nologin +gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin 
-postfix:x:89:89::/var/spool/postfix:/sbin/nologin +qemu:x:107:107:qemu user:/:/sbin/nologin 
-sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin +rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin 
-tcpdump:x:72:72::/:/sbin/nologin +rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin 
-trainee:x:1000:1000:trainee:/home/trainee:/bin/bash +saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin 
-vboxadd:x:992:1::/var/run/vboxadd:/bin/false +radvd:x:75:75:radvd user:/:/sbin/nologin 
-tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin +dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin 
-[root@centos7 tmp]# tail -c 512 /etc/passwd + 
-PulseAudio System Daemon:/var/run/pulse:/sbin/nologin +[root@centos8 tmp]# tail -c 512 /etc/passwd 
-gdm:x:42:42::/var/lib/gdm:/sbin/nologin +nstances:/nonexisting:/sbin/nologin 
-gnome-initial-setup:x:993:991::/run/gnome-initial-setup/:/sbin/nologin +rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin 
-postfix:x:89:89::/var/spool/postfix:/sbin/nologin +gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin 
-sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin +qemu:x:107:107:qemu user:/:/sbin/nologin 
-tcpdump:x:72:72::/:/sbin/nologin +rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin 
-trainee:x:1000:1000:trainee:/home/trainee:/bin/bash +rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin 
-vboxadd:x:992:1::/var/run/vboxadd:/bin/false +saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin 
-tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin+radvd:x:75:75:radvd user:/:/sbin/nologin 
 +dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin
 </code> </code>
  
Ligne 3346: Ligne 3326:
 | G | 1024*1024*1024 | | G | 1024*1024*1024 |
  
-A useful switch to use with the tail command is **-f**. This switch continually updates the output: +A useful switch to use with the tail command is **-f**. This switch continually updates the output:
  
 <code> <code>
-[root@centos7 tmp]# tail -f /var/log/messages +[root@centos8 tmp]# tail -f /var/log/messages 
-Oct 19 15:58:06 centos7 dbus-daemon: dbus[542]: [system] Activating service name='org.freedesktop.PackageKit' (using servicehelper) +Apr 20 06:27:53 centos8 systemd[1]: Started dnf makecache
-Oct 19 15:58:06 centos7 dbus[542]: [system] Activating service name='org.freedesktop.PackageKit' (using servicehelper) +Apr 20 07:28:29 centos8 systemd[1]: Starting dnf makecache... 
-Oct 19 15:58:06 centos7 dbus-daemon: dbus[542]: [system] Successfully activated service 'org.freedesktop.PackageKit' +Apr 20 07:28:29 centos8 dnf[12423]: Metadata cache refreshed recently
-Oct 19 15:58:06 centos7 dbus[542]: [system] Successfully activated service 'org.freedesktop.PackageKit' +Apr 20 07:28:29 centos8 systemd[1]: dnf-makecache.service: Succeeded
-Oct 19 16:00:01 centos7 systemd: Created slice user-0.slice+Apr 20 07:28:29 centos8 systemd[1]Started dnf makecache
-Oct 19 16:00:01 centos7 systemd: Starting Session 17 of user root+Apr 20 07:50:35 centos8 systemd[1]Started /usr/bin/systemctl start man-db-cache-update
-Oct 19 16:00:01 centos7 systemd: Started Session 17 of user root+Apr 20 07:50:35 centos8 systemd[1]Starting man-db-cache-update.service..
-Oct 19 16:01:01 centos7 systemd: Created slice user-0.slice+Apr 20 07:50:36 centos8 systemd[1]man-db-cache-update.service: Succeeded
-Oct 19 16:01:01 centos7 systemd: Starting Session 18 of user root+Apr 20 07:50:36 centos8 systemd[1]Started man-db-cache-update.service
-Oct 19 16:01:01 centos7 systemd: Started Session 18 of user root.+Apr 20 07:50:36 centos8 systemd[1]run-r85917a32bc86476980c271609ba457fb.service: Succeeded.
 ^C ^C
 </code> </code>
Ligne 3365: Ligne 3345:
 ==Command Line Switches== ==Command Line Switches==
  
-<WRAP center round important 60%>+<WRAP center round todo 60%>
 **To do** : Use the **--help** option of the **head** command to view the command line switches. **To do** : Use the **--help** option of the **head** command to view the command line switches.
 </WRAP> </WRAP>
  
-===LAB #- Use the grep, tr and cut to extract your IP address from the output of ifconfig===+====LAB #- Use the grep, tr and cut to extract your IPv4 address from the output of ifconfig====
  
 <code> <code>
-[root@centos7 tmp]# ifconfig enp0s3 +[root@centos8 tmp]# ifconfig ens18 
-enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500 +ens18: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500 
-        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255 +        inet 10.0.2.45  netmask 255.255.255.0  broadcast 10.0.2.255 
-        inet6 fe80::a00:27ff:febd:f523  prefixlen 64  scopeid 0x20<link> +        inet6 fe80::86b6:8d39:cab2:d84d  prefixlen 64  scopeid 0x20<link> 
-        ether 08:00:27:bd:f5:23  txqueuelen 1000  (Ethernet) +        ether 4e:b1:31:bd:5d:b2  txqueuelen 1000  (Ethernet) 
-        RX packets 7462  bytes 6158140 (5.MiB)+        RX packets 11473  bytes 24023891 (22.MiB)
         RX errors 0  dropped 0  overruns 0  frame 0         RX errors 0  dropped 0  overruns 0  frame 0
-        TX packets 4130  bytes 555287 (542.2 KiB)+        TX packets 9521  bytes 1744650 (1.6 MiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
-[root@centos7 tmp]# ifconfig enp0s3 | grep "inet" +[root@centos8 tmp]# ifconfig ens18 | grep "inet" 
-        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255 +        inet 10.0.2.45  netmask 255.255.255.0  broadcast 10.0.2.255 
-        inet6 fe80::a00:27ff:febd:f523  prefixlen 64  scopeid 0x20<link>+        inet6 fe80::86b6:8d39:cab2:d84d  prefixlen 64  scopeid 0x20<link>
  
-[root@centos7 tmp]# ifconfig enp0s3 | grep "inet" | grep -v "inet6" +[root@centos8 tmp]# ifconfig ens18 | grep "inet" | grep -v "inet6" 
-        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255+        inet 10.0.2.45  netmask 255.255.255.0  broadcast 10.0.2.255
  
-[root@centos7 tmp]# ifconfig enp0s3 | grep "inet" | grep -v "inet6" | tr -s " " ":" +[root@centos8 tmp]# ifconfig ens18 | grep "inet" | grep -v "inet6" | tr -s " " ":" 
-:inet:10.0.2.15:netmask:255.255.255.0:broadcast:10.0.2.255+:inet:10.0.2.45:netmask:255.255.255.0:broadcast:10.0.2.255
  
-[root@centos7 tmp]# ifconfig enp0s3 | grep "inet" | grep -v "inet6" | tr -s " " ":" | cut -d: -f3 +[root@centos8 tmp]# ifconfig ens18 | grep "inet" | grep -v "inet6" | tr -s " " ":" | cut -d: -f3 
-10.0.2.15+10.0.2.45
 </code> </code>
  
Ligne 3400: Ligne 3380:
 </WRAP> </WRAP>
  
------ +====LAB #9 Use the grep, awk and sed to extract your IPv4 address from the output of ip====
-<html> +
-<div align="center"> +
-Copyright © 2004-2019 Hugh Norris.<br><br> +
-</div> +
-</html> +
------+
  
 +<code>
 +[root@centos8 tmp]# ip addr show ens18
 +2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
 +    link/ether 4e:b1:31:bd:5d:b2 brd ff:ff:ff:ff:ff:ff
 +    inet 10.0.2.45/24 brd 10.0.2.255 scope global noprefixroute ens18
 +       valid_lft forever preferred_lft forever
 +    inet6 fe80::86b6:8d39:cab2:d84d/64 scope link noprefixroute 
 +       valid_lft forever preferred_lft forever
 +
 +[root@centos8 tmp]# ip addr show ens18 | grep "inet"
 +    inet 10.0.2.45/24 brd 10.0.2.255 scope global noprefixroute ens18
 +    inet6 fe80::86b6:8d39:cab2:d84d/64 scope link noprefixroute 
 +
 +[root@centos8 tmp]# ip addr show ens18 | grep "inet" | grep -v "inet6"
 +    inet 10.0.2.45/24 brd 10.0.2.255 scope global noprefixroute ens18
 +
 +[root@centos8 tmp]# ip addr show ens18 | grep "inet" | grep -v "inet6" | awk '{ print $2; }'
 +10.0.2.45/24
 +
 +[root@centos8 tmp]# ip addr show ens18 | grep "inet" | grep -v "inet6" | awk '{ print $2; }' | sed 's/\/.*$//'
 +10.0.2.45
 +</code>
 +
 +-----
 +Copyright © 2023 Hugh Norris.
Menu