Network
netstat -tulpn | grep LISTEN | show all opened TPC/UDP sockets |
sudo ip link set eth0 up | enable/disable network interface eth0-interface name up/down |
cat /etc/services | less | list of services and ports |
find . -mmin -60 -type f -exec ls -l {} + | list changed files in last 60 min |
find . -type f -newermt ‘2023-01-01’ -not -path “./var/*” -not -path “./img/*” -ls | find newer files and exlude some files |
mail -s “Local Outbound SMTP Test” yyyy@xxxx.tld < /dev/null | test email from terminal |
sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y | full upgrade |
curl -T “test.pdf” ftp://192.168.50.5/backup/ -u user:pass | upload file with CURL to FTP |
find mydir -type f -exec curl -u xxx:psw --ftp-create-dirs -T {} ftp://192.168.1.158/public/demon_test/{} \; | upload all files with folders/subfolder with CURL to FTP |
update-alternatives –config php update-alternatives –config php-cgi | change system default PHP and PHP-CGI version |