From f23461e2cb553923147915c1a8a6f6c9521154ff Mon Sep 17 00:00:00 2001 From: Simoes Lukas Date: Tue, 17 Sep 2024 15:30:55 +0200 Subject: [PATCH] Fin du TP --- SCR/TP02/output_file | 187 ++++++++++++++++++++++++++++++++++++- SCR/TP02/tp02-reponses.txt | 10 +- 2 files changed, 195 insertions(+), 2 deletions(-) diff --git a/SCR/TP02/output_file b/SCR/TP02/output_file index e133fad..3ac4e29 100644 --- a/SCR/TP02/output_file +++ b/SCR/TP02/output_file @@ -1 +1,186 @@ -fi +total 1280 +drwxr-xr-x 3 root root 4096 Jul 19 2023 acpi +drwxr-xr-x 3 root root 4096 Jul 19 2023 alsa +-rw-r--r-- 1 root root 541 Apr 25 2022 anacrontab +-rw-r--r-- 1 root root 226 Nov 21 2022 ant.conf +drwxr-xr-x 3 root root 4096 Jul 19 2023 apparmor.d +-rw-r--r-- 1 root root 0 Jan 31 2023 arch-release +drwxr-xr-x 4 root root 4096 Jul 19 2023 audit +drwxr-xr-x 3 root root 4096 Jul 19 2023 avahi +-rw-r--r-- 1 root root 28 May 21 2023 bash.bash_logout +-rw-r--r-- 1 root root 605 May 21 2023 bash.bashrc +-rw-r--r-- 1 root root 2403 Jun 21 2023 bind.keys +-rw-r--r-- 1 root root 535 Nov 15 2022 bindresvport.blacklist +drwxr-xr-x 2 root root 4096 Jul 19 2023 binfmt.d +drwxr-xr-x 4 root root 4096 Jul 19 2023 ca-certificates +drwxr-xr-x 2 root root 4096 Jul 19 2023 cifs-utils +drwxr-xr-x 3 root root 4096 Jul 19 2023 cni +drwxr-xr-x 2 root root 4096 Jul 19 2023 conf.d +d--------- 2 root root 4096 Jul 19 2023 credstore +d--------- 2 root root 4096 Jul 19 2023 credstore.encrypted +drwxr-xr-x 2 root root 4096 Jul 19 2023 cron.d +drwxr-xr-x 2 root root 4096 Jul 19 2023 cron.daily +-rw-r--r-- 1 root root 74 Apr 25 2022 cron.deny +drwxr-xr-x 2 root root 4096 Jul 19 2023 cron.hourly +drwxr-xr-x 2 root root 4096 Jul 19 2023 cron.monthly +drwxr-xr-x 2 root root 4096 Jul 19 2023 cron.weekly +-rw------- 1 root root 722 Jan 31 2023 crypttab +drwxr-xr-x 5 root root 4096 Jul 19 2023 cups +drwxr-xr-x 3 root root 4096 Jul 19 2023 dconf +drwxr-xr-x 2 root root 4096 Jul 19 2023 debuginfod +drwxr-xr-x 2 root root 4096 Jul 19 2023 default +drwxr-xr-x 2 root root 4096 Jul 19 2023 depmod.d +-rw-r--r-- 1 root root 685 Feb 7 2023 e2scrub.conf +-rw-r--r-- 1 root root 97 May 25 2023 environment +-rw-r--r-- 1 root root 1362 Jan 27 2023 ethertypes +-rw-r--r-- 1 root root 429 Apr 20 2023 exports +drwxr-xr-x 2 root root 4096 Jul 19 2023 exports.d +drwxr-xr-x 3 root root 4096 Jul 19 2023 fonts +-rw-r--r-- 1 root root 477 Aug 29 16:55 fstab +-rw-r--r-- 1 root root 694 Mar 28 2023 fuse.conf +-rw-r--r-- 1 root root 2584 Apr 30 2023 gai.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 gdb +-rw-r--r-- 1 root root 266 Nov 5 2022 gemrc +drwxr-xr-x 3 root root 4096 Jul 19 2023 gimp +-rw-r--r-- 1 root root 3886 May 24 2023 gprofng.rc +-rw-r--r-- 1 root root 905 Jan 11 2024 group +-rw-r--r-- 1 root root 900 Jul 18 2023 group- +drwxr-xr-x 2 root root 4096 Jul 19 2023 grub.d +-rw------- 1 root root 806 Jan 11 2024 gshadow +-rw------- 1 root root 801 Jul 18 2023 gshadow- +drwxr-xr-x 3 root root 4096 Jul 19 2023 gss +drwxr-xr-x 2 root root 4096 Jul 19 2023 gssproxy +drwxr-xr-x 2 root root 4096 Jul 19 2023 gtk-2.0 +drwxr-xr-x 2 root root 4096 Jul 19 2023 gtk-3.0 +-rw-r--r-- 1 root root 450 Nov 17 2022 healthd.conf +-rw-r--r-- 1 root root 73 Jan 31 2023 host.conf +-rw-r--r-- 1 root root 12 Oct 16 2023 hostname +-rw-r--r-- 1 root root 273 Oct 16 2023 hosts +-rw-r--r-- 1 root root 171 Jul 13 2023 idmapd.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 ifplugd +drwxr-xr-x 2 root root 4096 Jul 19 2023 ImageMagick-7 +drwxr-xr-x 5 root root 4096 Jul 19 2023 initcpio +-rw-r--r-- 1 root root 714 Dec 27 2022 inputrc +drwxr-xr-x 2 root root 4096 Jul 19 2023 iproute2 +drwxr-xr-x 2 root root 4096 Jul 19 2023 iptables +-rw-r--r-- 1 root root 20 Jan 31 2023 issue +drwxr-xr-x 2 root root 4096 Jul 19 2023 jack +drwxr-xr-x 4 root root 4096 Jul 19 2023 java11-openjdk +drwxr-xr-x 6 root root 4096 Jul 19 2023 java-8-openjdk +drwxr-xr-x 5 root root 4096 Jul 19 2023 java-openjdk +drwxr-xr-x 3 root root 4096 Jul 19 2023 kernel +drwxr-xr-x 2 root root 4096 Jul 19 2023 keyutils +-rw-r--r-- 1 root root 421 Jul 13 2023 krb5.conf +-rw------- 1 root root 1418 Oct 16 2023 krb5.keytab +-rw-r--r-- 1 root root 140843 Oct 16 2023 ld.so.cache +-rw-r--r-- 1 root root 117 Jan 31 2023 ld.so.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 ld.so.conf.d +-rw-r----- 1 root root 191 May 2 2023 libaudit.conf +drwxr-xr-x 3 root root 4096 Jul 19 2023 libblockdev +drwxr-xr-x 2 root root 4096 Jul 19 2023 libinput +drwxr-xr-x 2 root root 4096 Jul 19 2023 libnl +drwxr-xr-x 2 root root 4096 Jul 19 2023 libpaper.d +drwxr-xr-x 2 root root 4096 Jul 19 2023 libreoffice +-rw-r--r-- 1 root root 24 Mar 29 2023 libva.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 lightdm +drwxr-xr-x 3 root root 4096 Jul 19 2023 lirc +-rw-r--r-- 1 root root 17 Jul 13 2023 locale.conf +-rw-r--r-- 1 root root 9955 Jul 13 2023 locale.gen +lrwxrwxrwx 1 root root 32 Jul 13 2023 localtime -> /usr/share/zoneinfo/Europe/Paris +-rw-r--r-- 1 root root 8195 Jan 25 2023 login.defs +drwxr-xr-x 2 root root 4096 Jul 19 2023 logrotate.d +-r--r--r-- 1 root root 33 Jul 13 2023 machine-id +-rw-r--r-- 1 root root 272 Jun 1 2023 mailcap +-rw-r--r-- 1 root root 6249 May 20 2023 makepkg.conf +-rw-r--r-- 1 root root 5218 Jan 9 2023 man_db.conf +-rw-r--r-- 1 root root 2349 Mar 30 2022 mdadm.conf +-rw-r--r-- 1 root root 74869 Jun 1 2023 mime.types +-rw-r--r-- 1 root root 813 Feb 7 2023 mke2fs.conf +-rw-r--r-- 1 root root 2794 May 29 2023 mkinitcpio.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 mkinitcpio.conf.d +drwxr-xr-x 2 root root 4096 Jul 19 2023 mkinitcpio.d +drwxr-xr-x 2 root root 4096 Jul 19 2023 modprobe.d +drwxr-xr-x 2 root root 4096 Jul 19 2023 modules-load.d +drwxr-xr-x 2 root root 4096 Jul 19 2023 mplayer +lrwxrwxrwx 1 root root 19 Jan 31 2023 mtab -> ../proc/self/mounts +-rw-r----- 1 root named 1219 Jun 21 2023 named.conf +-rw-r--r-- 1 root root 767 Nov 15 2022 netconfig +drwxr-xr-x 5 root root 4096 Jul 19 2023 netctl +-rw-r--r-- 1 root root 993 Jul 13 2023 nfs.conf +-rw-r--r-- 1 root root 3606 Jul 13 2023 nfsmount.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 nginx +-rw-r--r-- 1 root root 2387 Jul 13 2023 nscd.conf +-rw-r--r-- 1 root root 344 Jul 13 2023 nsswitch.conf +-rw-r--r-- 1 root root 618 Jul 13 2023 ntp.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 ODBCDataSources +-rw-r--r-- 1 root root 0 May 11 2022 odbc.ini +-rw-r--r-- 1 root root 0 May 11 2022 odbcinst.ini +drwxr-xr-x 3 root root 4096 Jul 19 2023 openldap +drwxr-xr-x 2 root root 4096 Jul 19 2023 openmpi +drwxr-xr-x 2 root root 4096 Jul 19 2023 openpmix +drwxr-xr-x 2 root root 4096 Sep 9 18:24 openvswitch +lrwxrwxrwx 1 root root 21 Jul 13 2023 os-release -> ../usr/lib/os-release +-rw-r--r-- 1 root root 3023 Jul 13 2023 pacman.conf +drwxr-xr-x 3 root root 4096 Jul 19 2023 pacman.d +drwxr-xr-x 2 root root 4096 Jul 19 2023 pam.d +-rw-r--r-- 1 root root 95 Jul 1 2023 papersize +-rw-r--r-- 1 root root 1309 Jul 1 2023 paperspecs +-rw-r--r-- 1 root root 1706 Jul 13 2023 passwd +-rw-r--r-- 1 root root 1072 Jul 13 2023 passwd- +drwxr-xr-x 2 root root 4096 Jul 19 2023 pinentry +drwxr-xr-x 2 root root 4096 Jul 19 2023 pkcs11 +drwxr-xr-x 3 root root 4096 Jul 19 2023 polkit-1 +drwxr-xr-x 4 root root 4096 Jul 19 2023 postfix +-rw-r--r-- 1 root root 1020 Jan 31 2023 profile +drwxr-xr-x 2 root root 4096 Jul 19 2023 profile.d +-rw-r--r-- 1 root root 3196 Jul 3 2023 protocols +drwxr-xr-x 2 root root 4096 Jul 19 2023 pulse +drwxr-xr-x 2 root root 4096 Jul 19 2023 rc_keymaps +-rw-r--r-- 1 root root 7692 May 26 2023 rc_maps.cfg +-rw-r--r-- 1 root root 1814 Apr 27 2023 request-key.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 request-key.d +-rw-r--r-- 1 root root 90 Sep 17 15:17 resolv.conf +-rw-r--r-- 1 root root 523 Nov 1 2022 rhashrc +-rw-r--r-- 1 root root 1634 Apr 30 2023 rpc +drwxr-xr-x 3 root root 4096 Jul 19 2023 samba +-rw-r--r-- 1 root root 139 Jan 31 2023 securetty +drwxr-xr-x 2 root root 4096 Jul 19 2023 security +-rw-r--r-- 1 root root 10593 Nov 17 2022 sensors3.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 sensors.d +-rw-r--r-- 1 root root 299304 Jul 3 2023 services +-rw------- 1 root root 1036 Jul 13 2023 shadow +-rw------- 1 root root 802 Jul 13 2023 shadow- +-rw-r--r-- 1 root root 113 Jul 13 2023 shells +drwxr-xr-x 2 root root 4096 Jul 19 2023 skel +-rw-r--r-- 1 root root 2030 Dec 27 2022 slsh.rc +drwxr-xr-x 2 root root 4096 Jul 19 2023 ssh +drwxr-xr-x 5 root root 4096 Jul 19 2023 ssl +-rw-r--r-- 1 root root 37 Jul 13 2023 subgid +-rw-r--r-- 1 root root 19 Jul 13 2023 subgid- +-rw-r--r-- 1 root root 37 Jul 13 2023 subuid +-rw-r--r-- 1 root root 19 Jul 13 2023 subuid- +-rw-r--r-- 1 root root 4327 Jul 12 2023 sudo.conf +-r--r----- 1 root root 3268 Dec 6 2023 sudoers +drwxr-x--- 2 root root 4096 Jul 19 2023 sudoers.d +-rw-r--r-- 1 root root 9800 Jul 12 2023 sudo_logsrvd.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 sysctl.d +drwxr-xr-x 5 root root 4096 Jul 19 2023 systemd +drwxr-xr-x 2 root root 4096 Jul 19 2023 tmpfiles.d +drwxr-xr-x 3 root root 4096 Jul 19 2023 tpm2-tss +-rw-r--r-- 1 root root 738 Oct 13 2020 trusted-key.key +-rw-r--r-- 1 root root 938 Jul 1 2020 ts.conf +drwxr-xr-x 4 root root 4096 Jul 19 2023 udev +drwxr-xr-x 2 root root 4096 Jul 19 2023 udisks2 +-rw-r--r-- 1 root root 568 Apr 21 2021 updatedb.conf +drwxr-xr-x 2 root root 4096 Jul 19 2023 UPower +-rw-r--r-- 1 root root 13 Jul 13 2023 vconsole.conf +-rw-r--r-- 1 root root 51 Mar 12 2022 vdpau_wrapper.cfg +-rw-r--r-- 1 root root 912 Jul 8 2023 vimrc +-rw-r--r-- 1 root root 5026 May 20 2023 wgetrc +drwxr-xr-x 4 root root 4096 Jul 19 2023 X11 +-rw-r--r-- 1 root root 622 Mar 26 2023 xattr.conf +drwxr-xr-x 10 root root 4096 Jul 19 2023 xdg +drwxr-xr-x 2 root root 4096 Jul 19 2023 xinetd.d +drwxr-xr-x 2 root root 4096 Jul 19 2023 xml +-rw-r--r-- 1 root root 1976 Jan 27 2023 xtables.conf +-rw-r--r-- 1 root root 1285 Jul 13 2023 yaourtrc diff --git a/SCR/TP02/tp02-reponses.txt b/SCR/TP02/tp02-reponses.txt index a4901a6..4074c6c 100644 --- a/SCR/TP02/tp02-reponses.txt +++ b/SCR/TP02/tp02-reponses.txt @@ -62,4 +62,12 @@ la commande >> modifie le fichier exclusivement si celle-ci ne renvoie pas rien les erreurs précedentes. La redirection 2> rajoute une erreur dans un fichier spécifié. 16. N'affiche rien 17. et 18. Affiche la sortie et l'erreur de la commande précédente -19. \ No newline at end of file +19. et 20. +21. wc permet de compter le nombre de caractères, de mots et de lignes entrées après éxecution +de la commande. +22. On obtient bien le nombre correct de caractères/lignes/mots +23. et 24. Liste les caractères/lignes/mots du fichier, la 2e commande n'affiche pas le nom +du fichier +25. On a listé tous les éléments de /etc/ en détail pour les mettre dans un fichier output_file +26. On a compté les caractères/mots/lignes du fichier output_file +27. ls -l /etc/ > output_file && wc < output_file \ No newline at end of file