2023 m. birželio 28 d., trečiadienis

Update git timestamp

How to update git timestamp

GIT_COMMITTER_DATE="$(date)" git commit --amend --no-edit --date "$(date)"

2023 m. birželio 27 d., antradienis

How to fix wsl2 ntp error

$ sudo sed -i 's/ConditionVirtualization=!container/#ConditionVirtualization=!container/' /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service

$ systemctl daemon-reload 

$ sudo systemctl restart systemd-timesyncd

Source: https://1kko.com/2460635

2023 m. birželio 11 d., sekmadienis

Naudongos linux programos

tldr - programų naudojimas

mcfly - Protiga paieška Ctrl + F

ncdu - Stebint disko vietą

bat - teksto stebejimui

2023 m. birželio 8 d., ketvirtadienis

EOF

 Run python in bash scripts:

#!/bin/bash
python3 <<EOF
print("test")
EOF

Modify resolv file:

#!/bin/bash
cat << EOF > /etc/resolv.conf
nameserver 8.8.4.4
EOF

2023 m. birželio 7 d., trečiadienis

Wach useful commands

Watch largest system files 

$ watch -n 5 -d "sudo find / -xdev -type f -size +100M | xargs ls -lah" 

Largests files in directory

$ du -h /var/log | sort -rh | head -n 10

Monitor open sockets

watch -d "ss -xls | grep dbus.sock