Skip to content

Instantly share code, notes, and snippets.

View ychaouche's full-sized avatar

Yassine Chaouche ychaouche

View GitHub Profile
root@messagerie-16[192.168.100.19] ~/DATA # dselect update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Reading package lists... Done
N: Repository 'Debian bookworm' changed its 'firmware component' value from 'non-free' to 'non-free-firmware'
N: More information about this can be found online in the Release notes at: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html#non-free-split
Merging available information
Replacing available packages info, using /var/cache/apt/available.
initial error messages:
Je ne comprend pas, use est à 64% sur / et 35% sur /var...
root@messagerie[192.168.100.25] ~ # unlink .bashrc_c-bash: cannot create temp file for here-document: No space left on device
unlink: cannot unlink ‘.bashrc_c’: No such file or directory
root@messagerie[192.168.100.25] ~ # unlink .bashrc_c
.bashrc_common .bashrc_custom .bashrc_custom~
root@messagerie[192.168.100.25] ~ # btrfs filesystem df /
Data, single: total=44.54GiB, used=27.88GiB
System, DUP: total=8.00MiB, used=16.00KiB
System, single: total=4.00MiB, used=0.00B
Metadata, DUP: total=1.00GiB, used=765.86MiB
Metadata, single: total=8.00MiB, used=0.00B
GlobalReserve, single: total=256.00MiB, used=0.00B
root@messagerie[192.168.100.25] ~ #
root@clone-messagerie[10.10.10.19] ~ # tr -d '\n' < /tmp/trexample | tr -d '\n'
line1line2root@clone-messagerie[10.10.10.19] ~ #
root@clone-messagerie[10.10.10.19] ~ #
root@clone-messagerie[10.10.10.19] ~ # cat /tmp/trexample
line1
line2
root@clone-messagerie[10.10.10.19] ~ #
root@clone-messagerie[10.10.10.19] ~ # mail.user.detail "$mail"
*************************** 1. row ***************************
FN:BOUKHAROUBA Sedik
[email protected]
TITLE:Sous-Directeur de station
X-DEPARTMENT:Radio M’Sila
TEL;TYPE=home:5028
BDAY;VALUE=date:2023-10-24
root@clone-messagerie[10.10.10.19] ~ # mail.user.detail "$mail" | grep -E 'TITLE|X-DEPARTMENT'
TITLE:Sous-Directeur de station
Outside of tmux, PATH is exported and has this value:
root@clone-messagerie[10.10.10.19] ~ # export | grep PATH
declare -x AWKPATH="~/SYNCHRO/lib/"
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/scripts/exploit--:/usr/local/scripts/exploit.tmp:/usr/local/scripts/mail:/usr/local/scripts/shorewall:/root/SYNCHRO/bin"
root@clone-messagerie[10.10.10.19] ~ #
Now inside of tmux :
@ychaouche
ychaouche / _txt.column.select.awk
Created September 24, 2025 14:09
column selection with awk
BEGIN {
split(COLS,columns_array,",");
for (i in columns_array){
col=columns_array[i];
n=split(col,range,"-");
if (n>1) {
min=range[1];
max=range[2];
@ychaouche
ychaouche / awk cut
Created September 24, 2025 13:57
awk code doens't preserve formatting
14:55:46 ~ -1- $ ls | head | awk '{$2=$3=$4=""; print}'
total
-rw-r--r-- 20K Jun 4 2024 absences.ods
-rw-r--r-- 7.1K Jun 4 2024 absences.xlsx
-rw-r--r-- 11K Mar 14 2023 ahmed.pdf
-rw-r--r-- 66K Mar 14 2023 ahmed.png
-rw-r--r-- 7.0K Mar 14 2023 ahmed.txt
drwxr-xr-x 4.0K Nov 5 2024 APPS
drwxr-xr-x 4.0K Jul 17 19:46 AUDIO
-rw-r--r-- 19K Apr 9 2023 bash.ps
@ychaouche
ychaouche / smtp
Created September 17, 2025 09:57
[...] smtp[...] E5A5E1C00096: to=<...>, relay=127.0.0.1[127.0.0.1]:10024, [...] queued as D3D291C000A7)
[...] smtp[...] E5A5E1C00096: to=<...>, relay=127.0.0.1[127.0.0.1]:10024, [...] queued as D3D291C000A7)
[...] smtp[...] E5A5E1C00096: to=<...>, relay=127.0.0.1[127.0.0.1]:10024, [...] queued as D3D291C000A7)
[...] smtp[...] E5A5E1C00096: to=<...>, relay=127.0.0.1[127.0.0.1]:10024, [...] queued as D3D291C000A7)
[...] smtp[...] E5A5E1C00096: to=<...>, relay=127.0.0.1[127.0.0.1]:10024, [...] queued as D3D291C000A7)
[...] smtp[...] E5A5E1C00096: to=<...>, relay=127.0.0.1[127.0.0.1]:10024, [...] queued as D3D291C000A7)
@ychaouche
ychaouche / txt.replace
Created September 16, 2025 15:11
txt.replace
Usage:
txt.replace -f fieldnumber -c command
Example:
Change the formatting of numbers in the output of ls
16:09:24 ~/MUSIQUE/CONTENT/RAM -1- $ command ls -l
total 73576
-rw-r--r-- 1 ychaouche ychaouche 5443123 Mar 9 2025 10.mp3
-rw-r--r-- 1 ychaouche ychaouche 4434170 Mar 9 2025 11.mp3