Linux cheatsheet – usefull commands


netstat -tulpn | grep LISTENshow all opened TPC/UDP sockets
sudo ip link set eth0 upenable/disable network interface eth0-interface name up/down
cat /etc/services | lesslist 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/*” -lsfind newer files and exlude some files
mail -s “Local Outbound SMTP Test” yyyy@xxxx.tld < /dev/nulltest email from terminal
sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt autoclean -yfull upgrade
curl -T “test.pdf” -u user:passupload file with CURL to FTP
find mydir -type f -exec curl -u xxx:psw --ftp-create-dirs -T {}{} \;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