Outils pour utilisateurs

Outils du site


issue126:q._et_r

Q How can I identify duplicate files? A (Thanks to ajgreeny in the Ubuntu Forums) Try fdupes. After installing it, view the man pages. 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.

Q Comment identifier les fichiers en double ?

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…. There are also websites which will send a fax, so you don't need fax hardware at all. Q Will there be a 32-bit 17.10? A There will not be a 32-bit Ubuntu 17.10 iso, so you will not be able to do a fresh install of 32-bit Ubuntu 17.10 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.

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…

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? https://goo.gl/mvJpWs * If I want 8GB swap, am I supposed to select 8000MB or 8192MB when selecting size? https://goo.gl/BU2QTv * How to use `cat` to see the top of a very long file? https://goo.gl/r5hSC7 * 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

* What's the difference between the different rename commands? https://goo.gl/m3Ze6t * How do I exit the systemctl status command's output? https://goo.gl/jNQPdP * Why is there a /bin/echo and why would I want to use it? https://goo.gl/FSEPQF * Can't type “|” (vertical pipe) https://goo.gl/xn5ezR * Get UUID of / filesystem from script 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 Rsync at last As promised, here is how I set up rsync to back-up my system. I based my approach on the tutorial at howtogeek.com. I have a small file server on my network, which has lots of space to back up the home folder of my daily driver. (I boot from an SSD, and all my media files are on a magnetic drive. I'm really just backing up configuration files and a few local files.) 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

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: ssh-keygen -t rsa ssh-copy-id gord@192.168.1.9 I had to answer a few questions, mostly taking defaults or saying “yes”. 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

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 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.

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' Where exlist.txt is a file listing the folders (or individual files) to exclude. For example, the line: .cache 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!

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.txt · Dernière modification : 2017/11/03 08:25 de d52fr