Openunix.eu


Check if anything arrives through UDP to port 514 (syslog)

tcpdump -n udp port 514

Monitor directory content in terminal

cd /var/syslog ; while true ; do ls -l ; sleep 1; echo "vypis:"; sleep 1;done

Monitor if port 514 is listening to UDP packets

while true; do netstat -nau |grep 514;echo ""; sleep 1; echo "Testuji port 514:"; sleep 3;done

Find non ascii file names

find . -name "*" |grep -P "[\x80-\xFF]"

Bulk rename files with sed

for i in ./"Lá*"; do m=`echo $i |sed -e '/á/a/'`;mv "$i" $m; done

Hacking with awk, sed and cut

Sed is the king here, but awk works better with columns and cut can easily split test using various delimiters.

 

Powered by NetBSD. Running on a toaster.