note
This commit is contained in:
parent
f1ce6dde86
commit
59c076fd05
56
docs/daily/05-12-2025.md
Normal file
56
docs/daily/05-12-2025.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
#cours d'aujourd'hui
|
||||||
|
finalisation du projet grabber :
|
||||||
|
|
||||||
|
|
||||||
|
rajout maj :
|
||||||
|
summary.txt avec un recap de la configue,hardware et software .
|
||||||
|
Ajout sur le script :
|
||||||
|
hardware() {
|
||||||
|
echo "[HARDWARE]" > $SUM
|
||||||
|
echo "CPU=$(lscpu -eMODELNAME|tail -n1)" >> $SUM
|
||||||
|
echo "CPU_ID=$(sudo dmidecode -t processor | grep ID | cut -d: -f2)" >> $SUM
|
||||||
|
RAM_SIZE=$(lsmem |grep 'Mémoire partagée' |cut -d: -f2|sed 's/\ //g')
|
||||||
|
RAM_GEN=$(sudo dmidecode -t memory | grep Type: | grep -v Unknown |tail -n1 | cut -d : -f2 |sed 's/\ *//')
|
||||||
|
echo "RAM=$RAM_SIZE $RAM_GEN" >> $SUM
|
||||||
|
echo "RAM_SIZE=$RAM_SIZE" >> $SUM
|
||||||
|
|
||||||
|
declare -a DEVICES
|
||||||
|
mapfile -t DEVICES < <(lsblk -dn -o NAME |grep -v loop)
|
||||||
|
|
||||||
|
declare -A PARTITIONS_BY_DISK
|
||||||
|
for disk in ${DEVICES[@]}; do
|
||||||
|
disk_path=$(printf '/dev/%s' "$disk")
|
||||||
|
disk_parts=$(lsblk -nr -o PKNAME,PATH $disk_path |grep -vE "^\ " |cut -d \ -f2)
|
||||||
|
PARTITIONS_BY_DISK[$disk]="${disk_parts[@]}"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "DEVICES=${DEVICES[@]}" >> $SUM
|
||||||
|
for disk in ${!PARTITIONS_BY_DISK[@]}; do
|
||||||
|
echo "PARTS_$disk=$(printf '%s ' ${PARTITIONS_BY_DISK[$disk]})" >> $SUM
|
||||||
|
done
|
||||||
|
STOCKAGE_TOTAL=0
|
||||||
|
Sizes=$(lsblk -dnb | grep -v loop |grep -v boot|tr -s " "|cut -d \ -f4)
|
||||||
|
for size in ${Sizes[@]} ;do
|
||||||
|
STOCKAGE_TOTAL+=$size
|
||||||
|
done
|
||||||
|
STOCKAGE_TOTAL=$(numfmt --to iec $STOCKAGE_TOTAL)
|
||||||
|
echo "STOCKAGE_TOTAL=$STOCKAGE_TOTAL" >> $SUM
|
||||||
|
}
|
||||||
|
hardware
|
||||||
|
|
||||||
|
software(){
|
||||||
|
echo "[SOFTWARE]" >> $SUM
|
||||||
|
echo "OS=$(lsb_release -a |grep DESCRIPTION | cut -f2)" >> $SUM
|
||||||
|
echo "ARCH=$(hostnamectl |grep Architecture |cut -d: -f2 |sed 's/\ //g' )" >> $SUM #=$(uname -m) version plus simple
|
||||||
|
echo "DESKTOP=$XDG_CURRENT_DESKTOP" >> $SUM
|
||||||
|
echo "WM=$XDG_SESSION_TYPE" >> $SUM
|
||||||
|
echo "KERNEL=$(uname -r)" >> $SUM
|
||||||
|
}
|
||||||
|
software
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dans le controle il y'aura surment une commande a faire en parti carte graphique donc il faut se motivé ( je parle moi mais au cas ou ou quelqu'un regarde mes notes)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
14
docs/daily/10-02-2026.md
Normal file
14
docs/daily/10-02-2026.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Semver
|
||||||
|
semantic Versionnage
|
||||||
|
1.1.O
|
||||||
|
version stable | bug
|
||||||
|
|
|
||||||
|
nouvelle fonctionalité
|
||||||
|
|
||||||
|
breakin change
|
||||||
|
+stable
|
||||||
|
|
||||||
|
|
||||||
|
regle de base de ton application 1.0.O sigifie que ton code est fini stable et convenable
|
||||||
|
|
||||||
|
git tag -a v0.0.1 -m "1s version"
|
||||||
20
docs/daily/21-11-2025.md
Normal file
20
docs/daily/21-11-2025.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
find ~ -type d = cherche les dossiers personnelle
|
||||||
|
find ~ -name "*.md"= cherche tout les dossiers qui finissent par md
|
||||||
|
find ~ -size +100M = cherche le plus gros dossier
|
||||||
|
find . -user "grabber" = cherche le dossier au nom de grabber
|
||||||
|
|
||||||
|
grep $USER/etc/passwd = (grep, qui permet de chercher du texte au sein des fichiers ) de tes users
|
||||||
|
|
||||||
|
|
||||||
|
grep "install" /var/log/apt/history.log
|
||||||
|
|
||||||
|
|
||||||
|
Utiliser tail et head pour filtrer des flux de texte.
|
||||||
|
commande ps
|
||||||
|
sudo tail -f /var/log/apt/history.log affiche en direct les changement de flux
|
||||||
|
cat /etc/passwd |sort -t: -k2 -n = montre les fichiers
|
||||||
|
ls -lh ~/Téléchargements |sort -hk5 = tirer a la 5 eme colonne
|
||||||
|
find . -type f 2>/dev/null | grep -oE '\.[a-z0-9]+$' |sort -u = Supprimer les doublons / tout en montrant les find de dossier
|
||||||
|
|
||||||
|
|
||||||
|
parti cours dans administration du poste de travail
|
||||||
3
docs/daily/28-11-2025.md
Normal file
3
docs/daily/28-11-2025.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#cours de fin novembre
|
||||||
|
|
||||||
|
on finalise l grabber , on revise les boucles
|
||||||
Loading…
x
Reference in New Issue
Block a user