Search this blog

mercredi 12 mai 2021

Create a tar.gz archive in parallel using SLURM

One-liner to submit SLURM job on 1 node to archive and compress a directory. 

sbatch -J MY_JOB_NAME -A MY_ACCOUNT -p MY_PARTITION -t 2:00:00 --mem 8G -N--mail-user=MY_EMAIL --mail-type=END --wrap "module load tools/pigz && tar -I pigz -cf OUTPUT.tar.gz PATH_TO_FOLDER_TO_ARCHIVE" 

This example sets the maximal time to 2 hours, the maximal memory to 8G, and needs pigz command to be available through a module named tools/pigz. Replace placeholders (words in capital letters, except END) by relevant values. 

mardi 25 septembre 2012

Ubuntu Unity: SSH launcher

1. Create a new file with gedit, in the Terminal type:

gedit ~/.local/share/applications/ssh-launcher.desktop
2. Copy & Paste this text into the above file:

[Desktop Entry]
Version=1.0
Name=Remote Servers
Comment=Login to my servers
Exec=gnome-terminal --disable-factory --sm-client-disable --class=remoteserver -x ssh -t minibox.local 
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=utilities-terminal
StartupNotify=true
StartupWMClass=RemoteServers
X-Ayatana-Desktop-Shortcuts=Server1;

[Server1 Shortcut Group]
Name=SSH into minibox.local
Exec=gnome-terminal --disable-factory --sm-client-disable  --class=remoteserver -x ssh -t minibox.local
TargetEnvironment=Unity

Comment=You can create more of these. Just add to X-Ayatana-Desktop-Shortcuts a "Server2", "Server3" etc, then change the domain name (in this case, "minibox.local") to the name of your server. You'll also notice that the default action (When you just click the icon in the launcher) is to SSH into minibox.local - you'll need to change that to your most used server.


3. Drag and Drop onto the launcher by navigating to ~/.local/share/applications/ in Nautilus.



Source: http://askubuntu.com/questions/35488/what-custom-launchers-and-unity-quicklists-are-available

jeudi 9 août 2012

Samsung SCX-4623F & Ubuntu 11.10/12.04: easy to install BW laser printer / Imprimante N&B à installation facile

EN: I definitively recommend the Samsung SCX-4623F black and white laser multifunction printer (MFP) (+scanner, +fax, +copies +automatic document feeder (ADF)) to be used with Ubuntu 11.10 or 12.04. Installation is easy because the drivers (printer+scanner) are included by default in the Ubuntu version. Price is low. Note that I have not tested the fax. The printer is not noisy when printing and totally silent in idle mode or 1-2 seconds after a job.

Contrary to many modern inkjet MFP, printing and scanning can not be independent from a computer (no internal software or memory, no card/USB reader, and no Scan button). For me, printing from the computer is quite natural but it is a pitty for the scanner. Nevertheless, the ADF allows you to scan 30-40 pages in a time and there is a button to send scanned documents directly in a directory of the connected computer (Not tested, may need to install the Samsung unified printer drivers to make it work). Nevertheless, as it is a USB model, it should not lead to numerous trips between the scanner and the computer (that would be more problematic with the model SCX-4623FN having an Ethernet/network connection).

About the printing and scanning quality, it is reasonable but not great. Text renders very well. Scanned documents are relatively good but colors are slightly altered.This MFP should be used for private purpose only.


FR: Je recommande l'imprimante multifonction (IMF) laser noir et blanc Samsung SCX-4623F (+scanner, +fax, +copies, chargeur automatique de documents (CAD)) pour être utilisée avec Ubuntu 11.10 ou 12.04. L'installation est facile car les pilotes (imprimante + scanner) sont inclus par défaut dans la distribution Ubuntu. Le prix est un des plus bas de la catégorie. Notez que je n'ai pas testé le fax. L'imprimante n'est pas bruyante lors de l'impression, et totalement silencieuse en mode veille ou 1-2 secondes après une impression.

Contrairement à beaucoup de IMF
moderne à jet d'encre, l'impression et la numérisation ne peut pas être indépendantes d'un ordinateur (pas de logiciel ou mémoire interne,  pas de lecteur de carte ou USB, et aucun bouton Scan). Pour moi, l'impression à partir de l'ordinateur est tout à fait naturelle, mais c'est dommage pour le scanner. Néanmoins, le CAD vous permet de numériser 30-40 pages en 1 opération et il ya un bouton pour envoyer les documents numérisés directement dans un répertoire de l'ordinateur connecté (non testé, installer les pilotes d'imprimante Samsung unifiées pourrait être utile) . Néanmoins, comme il s'agit d'un modèle USB, cela ne devrait pas poser de problèmes d'aller retours entre le scanner et l'ordinateur (cela devrait être plus problématique avec le modèle SCX-4623FN qui se connecte par Ethernet / réseau).

À propos de la qualité d'impression et de numérisation, elle est raisonnable mais pas à tomber par terre. Le texte rend très bien. Les documents numérisés sont relativement bons mais les couleurs sont légèrement altérées. Cette MFP est à réserver à une utilisation privée.

vendredi 20 juillet 2012

Linux: delete duplicated files / effacer fichiers dupliqués

In case you have a folder (and sub folders) containing many duplicated files that were renamed with a pattern such as "(2)", "(3)", or "Copy of", you could run the commands below permanently delete them. Change eventually the path to the directory and the pattern "*(2).pdf" to fit your needs.

Si l'un de vos dossiers (et ses sous dossiers) contient des fichiers dupliqués dont le nom a été changé avec un motif tel que "(2)", "(3)", or "Copie de", vous pouvez effacer définitivement ces fichiers en lançant les commandes ci-dessous. Changez les chemin vers le dossier (/path/to/directory/with/duplicates) et le motif de la commande find "*(2).pdf" pour les adapter à votre cas.

cd /path/to/directory/with/duplicates
find . -name "*(2).pdf" -exec rm -rf {} \;


jeudi 15 mars 2012

Fingerprint reader for Lenovo X220t on Ubuntu 11.10

Type the following command to identify your fingerprint reader:
lsusb
If you see this in the output you can try the installation procedure below:

147e:2016 Upek Biometric Touchchip/Touchstrip fingerprint Sensor


Installation:
sudo add-apt-repository ppa:fingerprint/fingerprint-gui
sudo apt-get update
sudo apt-get install fingerprint-gui policykit-1-fingerprint-gui libbsapi.
Then, run the software to configure your fingerprints.
fingerprint-gui

source: http://doc.ubuntu-fr.org/fingerprintgui

jeudi 1 mars 2012

SSH remove fingerprint or key from known hosts list

Run this command replacing hostname by relevant name:

ssh-keygen -R hostname

mardi 28 février 2012

how to save a list of installed packages and install these packages later

The following solution may be worth trying:

http://www.arsgeek.com/2006/09/19/ubuntu-tricks-how-to-generate-a-list-of-installed-packages-and-use-it-to-reinstall-packages/