Outils pour utilisateurs

Outils du site


issue126:q._et_r

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
issue126:q._et_r [2017/10/29 18:27] – créée auntieeissue126:q._et_r [2017/11/03 08:25] (Version actuelle) d52fr
Ligne 1: Ligne 1:
-Q How can I identify duplicate files?+**Q How can I identify duplicate files?
  
 A (Thanks to ajgreeny in the Ubuntu Forums) Try fdupes. After installing it, view the man pages. A (Thanks to ajgreeny in the Ubuntu Forums) Try fdupes. After installing it, view the man pages.
Ligne 7: Ligne 7:
 Q I plan to build a high-performance PC. Here are the specs.... (Including only a rotating drive for storage.) Q I plan to build a high-performance PC. Here are the specs.... (Including only a rotating drive for storage.)
  
-A Add a small SSD for the OS, programs, and config files! There are a few easy ways to have media files on the rotating drive.+A Add a small SSD for the OS, programs, and config files! There are a few easy ways to have media files on the rotating drive.**
  
  
 +Q Comment identifier les fichiers en double ?
  
-Q Occasionally I need to send a fax. All I've been able to find have been "winmodems" requiring elements of the the Windows GDI to work.+R (Remerciements à ajgreeny sur les forums Ubuntu.) Essayez fdupes. Après l'avoir installé, regardez les pages man. 
 + 
 + 
 +Q J'envisage d'assembler un PC à hautes performances. Voici les spécifications... (qui ne comprennent qu'un disque traditionnel pour le stockage). 
 + 
 +R Ajoutez un petit SSD pour le système d'exploitation, les programmes et les fichiers de configuration ! Vous pouvez mettre des fichiers média sur le disque traditionnel de deux ou trois manières faciles. 
 + 
 + 
 +**Q Occasionally I need to send a fax. All I've been able to find have been "winmodems" requiring elements of the the Windows GDI to work.
  
 A These days, some winmodems should work just fine in Linux. Might tax your Google skills.... A These days, some winmodems should work just fine in Linux. Might tax your Google skills....
  
 There are also websites which will send a fax, so you don't need fax hardware at all. There are also websites which will send a fax, so you don't need fax hardware at all.
- 
  
  
Ligne 25: Ligne 33:
 However, if you have an older 32-bit install, you will be able to upgrade it to 17.10, and to 18.04 when it becomes available. However, if you have an older 32-bit install, you will be able to upgrade it to 17.10, and to 18.04 when it becomes available.
  
-Also, the other flavors (Lubuntu, Xubuntu, Ubuntu Mate, Kubuntu) are not affected by this decision. For each of them, the team behind the distro will make its own decision. Most people with 32-bit computers are already using Lubuntu, Xubuntu or Ubuntu Mate.+Also, the other flavors (Lubuntu, Xubuntu, Ubuntu Mate, Kubuntu) are not affected by this decision. For each of them, the team behind the distro will make its own decision. Most people with 32-bit computers are already using Lubuntu, Xubuntu or Ubuntu Mate.**
  
  
 +Q De temps en temps, j'ai besoin d'envoyer un fax. Tout ce que j'ai pu trouver était des « winmodems » qui nécessitent des éléments de l'interface graphique Windows pour fonctionner.
  
 +R De nos jours, certains winmodems devraient fonctionner sans problème sous Linux. Ça peut éventuellement éprouver vos compétences avec Google...
  
-Top questions at Askubuntu+Des sites Web qui enverront des fax existent aussi ; ainsi, vous n'avez pas besoin d'un matériel fax du tout. 
 + 
 + 
 +Q Y aura-t-il une 17.10 à 32 bits ? 
 + 
 +R Il n'y aura pas d'ISO d'Ubuntu 17.10 à 32 bits et vous ne pourrez donc pas faire une nouvelle installation. 
 + 
 +Cela dit, si vous avez une installation 32-bit moins récente, vous pourrez la mettre à niveau vers la 17.10 et vers la 18.04 quand elle sera disponible. 
 + 
 +En outre, les autres saveurs (Lubuntu, Xubuntu, Ubuntu Mate, Kubuntu) ne sont pas affectées par la décision. L'équipe derrière chacune de ces distrib. prendra sa propre décision. La plupart des gens ayant des ordinateurs à 32-bits utilisent déjà lubuntu, Xubuntu ou Ubuntu Mate. 
 + 
 +  
 +**Top questions at Askubuntu
  
 * Does sudo su create a child terminal?  * Does sudo su create a child terminal? 
Ligne 42: Ligne 64:
  
 * Pacman's equivalent in Ubuntu * Pacman's equivalent in Ubuntu
 +https://goo.gl/UK9K86**
 +
 +Questions les plus populaires sur Askubuntu
 +
 +* sudo su crée-t-il un terminal enfant ?
 +https://goo.gl/mvJpWs
 +
 +* Si je veux une partition swap de 8 Go, devrais-je sélectionner 8000 Mo ou 8192 Mo comme taille ?
 +https://goo.gl/BU2QTv
 +
 +* Comment utiliser « cat » pour voir le début d'un très long fichier ?
 +https://goo.gl/r5hSC7
 +
 +* L'équivalent de Pacman sous Ubuntu
 https://goo.gl/UK9K86 https://goo.gl/UK9K86
 +
 +**
  
 * What's the difference between the different rename commands? * What's the difference between the different rename commands?
Ligne 57: Ligne 95:
  
 * Get UUID of / filesystem from script * Get UUID of / filesystem from script
-https://goo.gl/JFUP82+https://goo.gl/JFUP82**
  
 +* Quelle est la différence entre les différentes commandes rename (renommer) ?
 +https://goo.gl/m3Ze6t
 +
 +* Comment quitter le résultat de la commande systemctl status ?
 +https://goo.gl/jNQPdP
 +
 +* Pourquoi existe-t-il un /bin/echo et pourquoi voudrais-je éventuellement m'en servir ?
 +https://goo.gl/FSEPQF
 +
 +* Je n'arrive pas à taper « | » (pipe verticale)
 +https://goo.gl/xn5ezR
 +
 +* Récupérer l'UUID du système de fichiers / à partir d'un script
 +https://goo.gl/JFUP82
  
  
-Tips and Techniques+**Tips and Techniques
  
 Rsync at last Rsync at last
Ligne 71: Ligne 123:
 Reading ahead, it looks like my eventual setup will benefit from using SSH with keys rather than a password, and that in turn will be easier if the server has a static IP address. Fortunately, I had previously configured my server with a static IP address. Reading ahead, it looks like my eventual setup will benefit from using SSH with keys rather than a password, and that in turn will be easier if the server has a static IP address. Fortunately, I had previously configured my server with a static IP address.
  
-If I had needed to set up a static IP address, I would have set up a DHCP rule on my router, "if this MAC address appears, give it the IP address 192.168.1.9." The MAC address can be obtained using the ifconfig command, and looks like this: 00:24:1d:84:34:c1+If I had needed to set up a static IP address, I would have set up a DHCP rule on my router, "if this MAC address appears, give it the IP address 192.168.1.9." The MAC address can be obtained using the ifconfig command, and looks like this: 00:24:1d:84:34:c1**
  
-I found a tutorial on setting up SSH with keys at digitalocean.com. I was astonished to learn that all it took was two commands, then I had ssh access to the server -- without ever touching the server's keyboard.+Trucs et astuces 
 + 
 +Enfin Rsync 
 + 
 +Comme promis, voici comment j'ai configuré rsync pour sauvegarder mon système. Mon approche est basée sur le tutoriel à howtogeek.com. 
 + 
 +Un petit serveur de fichiers fait partie de mon réseau ; il y a beaucoup d'espace dessus sur lequel sauvegarder le dossier home de mon disque quotidien. (Je démarre sur un SSD et tous mes fichiers média se trouvent sur un disque traditionnel. Je ne sauvegarde en fait que des fichiers de configuration et quelques fichiers locaux.) 
 + 
 +En anticipant un peu, je pense que, pour ma configuration finale, il sera mieux d'utiliser SSH avec des clés plutôt qu'un mot de passe ; cela sera plus facile si le serveur a une adresse IP statique. Heureusement, j'avais configuré mon serveur avec une adresse IP statique auparavant. 
 + 
 +Si j'avais eu besoin d'assigner une adresse IP statique, j'aurais transmis une règle DHCP à mon routeur : « si cette adresse MAC paraît, donnez-lui l'adresse IP 192.168.0.9 ». Vous pouvez obtenir l'adresse MAC avec la commande ifconfig. Elle ressemble à ceci : 00:24:1d:84:34:c1 
 + 
 +**I found a tutorial on setting up SSH with keys at digitalocean.com. I was astonished to learn that all it took was two commands, then I had ssh access to the server -- without ever touching the server's keyboard.
  
 The two commands: The two commands:
Ligne 84: Ligne 148:
  
 Back to howtogeek. My first deviation from howtogeek is use of rync's --delete switch. If I accidentally delete a file, I want to preserve the backup copy, so no --delete for me. I had previously created a folder called Public, so the backup command became: Back to howtogeek. My first deviation from howtogeek is use of rync's --delete switch. If I accidentally delete a file, I want to preserve the backup copy, so no --delete for me. I had previously created a folder called Public, so the backup command became:
 +
 +rsync -av -e ssh /home/gord gord@192.168.1.9:Public**
 +
 +
 +J'ai trouvé un tutoriel pour le paramétrage de SSH avec des clés sur digitalocean.com. Quelle surprise quand j'ai appris qu'il ne fallait que deux commandes pour avoir un accès au serveur par ssh -- sans jamais toucher au clavier du serveur.
 +
 +Les deux commandes :
 +
 +ssh-keygen -t rsa
 +
 +ssh-copy-id gord@192.168.1.9
 +
 +J'ai dû répondre à quelques questions et, la plupart du temps, j'ai accepté les défauts ou dit « oui ».
 +
 +Retour à howtogeek. La première fois que je me suis écarté de howtogeek concerne l'utilisation de --delete (supprimer) dans rsync. Si je supprime un fichier accidentellement, je veux en avoir une copie de sauvegarde et il n'y aura pas de --delete pour moi. Puisque j'avais déjà créé un dossier appelé Public, ma commande de sauvegarde est donc devenue :
  
 rsync -av -e ssh /home/gord gord@192.168.1.9:Public rsync -av -e ssh /home/gord gord@192.168.1.9:Public
  
-The final step was to automate the backups. I had never set up a cron job before; howtogeek spelled it out. The line I put in crontab is:+**The final step was to automate the backups. I had never set up a cron job before; howtogeek spelled it out. The line I put in crontab is:
  
 30 3 * * * rsync -av -e ssh /home/gord gord@192.168.1.9:Public >backup.txt 30 3 * * * rsync -av -e ssh /home/gord gord@192.168.1.9:Public >backup.txt
  
-Rsync automatically does incremental backups. Perhaps once a month, I would prefer to do a full backup. My plan is to set up a Public2 folder, and switch to it in the crontab. Once I have a full backup in Public2, I can clean out Public, and switch back to it next month. There may be a more elegant way to do it using an rsync parameter, but I know this will work.+Rsync automatically does incremental backups. Perhaps once a month, I would prefer to do a full backup. My plan is to set up a Public2 folder, and switch to it in the crontab. Once I have a full backup in Public2, I can clean out Public, and switch back to it next month. There may be a more elegant way to do it using an rsync parameter, but I know this will work.**
  
-You may notice that I directed the output from rsync to a text file. My first full backup took 44 minutes to back up 3.3 GB of data. (My file server uses a slow Wi-Fi connection.) It turns out that I don't need backup for most of it, files in the browser caches and the like. So how do you exclude folders? Thegeekstuff had a tutorial. For the greatest flexibility, I wanted to have a file listing the folders to exclude. The rsync parameter is:+La dernière étape était l'automatisation des sauvegardes. Je n'avais jamais mis une tâche cron en route auparavant ; howtogeek disait très clairement comment faire. La ligne que j'ai mise dans crontab est : 
 + 
 +30 3 * * * rsync -av -e ssh /home/gord gord@192.168.1.9:Public >backup.txt 
 + 
 +Rsync fait des sauvegardes incrémentielles automatiquement. À peu près une fois par mois, je préférerais faire une sauvegarde complète. Mon plan est de créer un dossier Public2 et changer pour lui dans crontab. Dès qu'il y aura une sauvegarde complète dans Public2, je pourrai nettoyer Public et y revenir le mois suivant. Il existe sans doute une façon plus élégante de le faire, en se servant d'un paramètre rsync, mais je sais que ce que j'envisage fonctionnera. 
 + 
 +**You may notice that I directed the output from rsync to a text file. My first full backup took 44 minutes to back up 3.3 GB of data. (My file server uses a slow Wi-Fi connection.) It turns out that I don't need backup for most of it, files in the browser caches and the like. So how do you exclude folders? Thegeekstuff had a tutorial. For the greatest flexibility, I wanted to have a file listing the folders to exclude. The rsync parameter is:
  
 --exclude-from 'exlist.txt' --exclude-from 'exlist.txt'
Ligne 103: Ligne 188:
 excludes that folder and all folders below it. excludes that folder and all folders below it.
  
-In summary, this job took a lot less effort than I had expected -- and a lot fewer commands. I not only learned about rsync, but also ssh and cron. Not bad for a couple of hours of work!+In summary, this job took a lot less effort than I had expected -- and a lot fewer commands. I not only learned about rsync, but also ssh and cron. Not bad for a couple of hours of work!** 
 + 
 +Vous remarquerez peut-être que j'ai dirigé la sortie de rsync vers un fichier texte. Lors de ma première sauvegarde complète, il a fallu 44 minutes pour sauvegarder 3,3 Go de données. (Mon serveur de fichiers utilise une connexion WiFi lente.) Il s'avère que je n'ai pas besoin de sauvegarder la plupart des fichiers - ceux dans les caches du navigateur et similaires. Alors comment exclure des dossiers ? Thegeekstuff proposait un tutoriel. Pour une flexibilité maximale, je voulais un fichier où lister les dossiers à exclure. Le paramètre de rsync est : 
 + 
 +--exclude-from 'exlist.txt' 
 + 
 +où exlist.txt est un fichier énumérant les dossiers (ou les fichiers) à exclure. Par exemple, la ligne : 
 + 
 +.cache 
 + 
 +exclut ce dossier-là et tous les dossiers en dessous. 
 + 
 +En résumé, ce travail nécessitait beaucoup moins d'efforts que j'avais prévu, et beaucoup moins de commandes. Outre apprendre rsync, je me suis aussi familiarisé avec ssh et cron. Pas mal pour deux heures de travail ! 
 + 
  
issue126/q._et_r.1509298073.txt.gz · Dernière modification : 2017/10/29 18:27 de auntiee