This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1. installation d'une qla25xx dans tina-save-cat | |
h1. création des backstores/fileio | |
<pre><code class="coffeescript"> | |
mkdir -p /var/ibm.quorum | |
chown -R root:root /var/ibm.quorum | |
dd if=/dev/zero of=/var/ibm.quorum/quorum1.disk count=1024 bs=1M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fdisk -l # pour vous aider à trouver la partition sur laquelle est votre ubuntu | |
mount /dev/sdaX /mnt # montage de celle-ci en remplaçant le X par le bon numéro de partition | |
mount --bind /dev /mnt/dev # lien symbolique du dossier /dev en cours d'utilisation vers le disque monté | |
mount --bind /dev/pts /mnt/dev/pts # lien symbolique du dossier /dev/pts en cours d'utilisation vers le disque monté | |
mount --bind /sys /mnt/sys # lien symbolique du dossier /sys en cours d'utilisation vers le disque monté | |
mount -t proc /proc /mnt/proc # Pour que Grub2 trouve /proc/mounts | |
chroot /mnt /bin/bash # mise à la racine du disque monté | |
mount -a # montage des partitions dans le chroot | |
apt-get install grub-pc # installation du logiciel Grub2 (sur le disque maintenant à la racine) | |
update-grub # création d'un nouveau fichier de configuration : grub.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# No-IP DDNS Updater | |
# http://www.noip.com/integrate/ | |
:global publicIP; | |
:global abortUpdate; | |
:if ([:typeof $abortUpdate] != "bool") do={ | |
:set $abortUpdate false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export ANSIBLE_DIR="/mnt/gfs_lv_ansible" | |
export VENV_NAME="venv" | |
export VENV_DIR="$ANSIBLE_DIR/$VENV_NAME" | |
export PIP_LIST="ansible ansible-lint jinja2 jmespath yamllint" | |
export ACTION=$1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find /data -type d -print0 | xargs -0 chmod 755 | |
# find /data -type f -print0 | xargs -0 chmod 644 | |
find /data -type d -exec chmod 755 {} \; | |
find /data -type f -exec chmod 644 {} \; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "GET /" > /dev/tcp/192.168.175.140/80 | |
echo "data" > /dev/udp/192.168.175.10.53 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## tcp one port | |
ip=192.168.175.140 ; port=80 ; timeout 1 bash -c "</dev/tcp/$ip/$port && echo $ip port tcp/$port open || echo $ip port tcp/$port closed" 2>/dev/null || echo $ip port tcp/$port connection timeout 2>/dev/null | |
## udp range port | |
ip=192.168.175.140 ; for port in $(seq 1 65535); do timeout 1 bash -c "</dev/tcp/$ip/$port && echo $ip port tcp/$port open || echo $ip port tcp/$port closed" 2>/dev/null || echo $ip port tcp/$port connection timeout 2>/dev/null; done | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## splitter un fichier en plusieurs | |
## creer fichier template | |
for i in {0..100000000};do echo "} | |
## 1- par nombre de ligne | |
split -d -l50000 texte.txt suffix- | |
## 2- par quantité | |
split -d -n4 texte.txt suffix- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### bash split | |
${var#*SubStr} # will drop begin of string up to first occur of `SubStr` | |
${var##*SubStr} # will drop begin of string up to last occur of `SubStr` | |
${var%SubStr*} # will drop part of string from last occur of `SubStr` to the end | |
${var%%SubStr*} # will drop part of string from first occur of `SubStr` to the end | |
string="} | |
echo $string | cut -d';' -f1 # output is 1 |
NewerOlder