SENDING A FILE OVER ICMP WITH HPING

October 29, 2013 by gustavo | hping, icmp


To send: hping3 --icmp --sign MSGID1 -d 50 -c 1 --file To receive: hping3 --listen -I eth0 --sig...

RM ALL FILES EXCEPT SOME EXTENSIONS

October 4, 2013 by gustavo | bash, shell


remove all files except the .sh and .py rm !(*.sh|*.py)

SITE DOWNLOAD WITH WGET

March 6, 2013 by gustavo | wget


wget -m -F -p -np -k -erobots=off -U mozilla --limit-rate=100K --wait=2 --html-extension http://blog...

CLEAN ALL LOG FILES

December 9, 2012 by gustavo | log, shell


find . -size +1M -iname \*.log | xargs -i bash -c "echo > {}"

COMPARE THE CONTENTS OF 2 DIRS

November 8, 2012 by gustavo | shell


comm -3 <(ls -1 dir1) <(ls -1 dir2) # Show only 2 columns, each for files unique to the directory

CRIANDO ARQUIVO DE TEXTO SEM EDITOR

November 6, 2012 by gustavo | shell


cat > arquivo.txt teste 1, 2, 3 testando

DESCOBRINDO VERSÃO DO LINUX

November 6, 2012 by gustavo | Linux, versão


cat /etc/[A-Za-z]*[_-][rv]e[lr]* cat /etc/issue uname -a lsb_release -a #ubuntu somente

RANDOM LINE FROM THE FILE

October 25, 2012 by gustavo | bash, shell


shuf -n1 file.txt

APACHE ARCHIVA LOCK USER GUEST

October 24, 2012 by gustavo | apache


$ vim glassfish_2.1/domains/archiva/lib/classes/org/apache/maven/archiva/security.properties secu...

COUNT TOTAL STRING IN FILE USING GREP

October 23, 2012 by gustavo | grep, shell


# number of lines that contains STRING grep -c STRING file.txt # number of word STRING grep -wc...