228 private links
On reprends les tips 👍
Juste après le « shebang », mettre ça sur la ligne d’après :
set -euo pipefail
set -e
which ensures that your script stops on first command failure.set -u
which ensures that your script exits on the first unset variable encountered.set -o pipefail
which ensures that if any command in a set of piped commands failed, the overall exit status is the status of the failed command.
😍 Wow, c'est outil à la classe pour sa simplicité et tout ce qu'on peut faire avec !
Un superbe moyen de transférer des fichiers en P2P, ou alors envoyer des données via les pipes❗
Not only adding some blank line but clean the terminal for real : printf "\033c"
or tput reset
:
My last example is with tmux: the .bashrc
is not well and after investigating, it turns out "$HOME/toMyPath"
solved my problem.
An alternative to curl and wget for the http requests. So easy to use <3
(shared by https://sebsauvage.net/links/?ptcFEQ)
Overview of the recutils tools to manage a database with plain text files
Print the duration of each video passed as argument
#!/bin/bash
for video in "$@"
do
duration=$(mediainfo "$video" |grep "Duration" |head -n 1 |cut -d':' -f 2)
echo "$duration ― $video"
done
Need the mediainfo
command (install with apt)
Note: À utiliser →
Ctrl + U : supprimer avant le curseur jusqu’au début de la ligne
Ctrl + K : supprimer depuis le curseur jusqu’à la fin de la ligne (Killing)
Ctrl + W : supprimer avant le curseur jusqu’au début de la chaîne
Alt + D : supprimer depuis le curseur jusqu’à la fin de la chaîne
The tool e2label is great for that. Easy to use :
sudo e2label /dev/sdb "usb Key Label"
instead of using gparted
Oh yes ! It works perfectly
Sous le coude, ça peut servir
rkhunter ist a tool used for malware detection.
sudo apt-get install rkhunter
is sufficient to install it.
I don't know if the program is outdated.
Le service web de la commande tldr
. Lien du repository
After watching Mr. Robot S03E01 I looked for the command shred
I didn't know. It turns out that it is a great tool.
I was wandering why using it (rm usually removes only the entry in the file table on the disk). I searched for a short article after I figured it out. Some must exists after all :)
Here it is. If someone ask me why is shred useful, I can redirect to this link.
Notes : this is not always the way to erase data (cf: Is it really working?). Turn to shredlog.