Category Archives: Bash

search and replace from the command line

 

Truncate file to 0 linux

echo > filename

Git remove commit history

http://stackoverflow.com/questions/13716658/how-to-delete-all-commit-history-in-github

Keepalived – Spamming /var/log/syslog ->

If you’re just using keepalived to manage IP addresses (i.e. you’re not using the virtual_server or lvs_sync_daemon features), it’s possible to run it under a Linode kernel by disabling LVS/IPVS features. Simply pass in the –vrrp (or -P) option on the command-line (add it to DAEMON_ARGS in /etc/default/keepalived in Debian/Ubuntu) and you’ll be good to go!

 

php compile from source configure

./configure \
–prefix=/usr/local \
–with-ldap=/usr \
–with-libdir=lib64 \
–with-kerberos=/usr \
–enable-cli \
–with-zlib-dir=/usr \
–enable-exif \
–enable-ftp \
–enable-mbstring \
–enable-mbregex \
–enable-sockets \
–enable-maintainer-zts \
–with-curl=/usr \
–with-config-file-path=/etc \
–sysconfdir=/private/etc \
–with-mysql-sock=/var/mysql/mysql.sock \
–with-mysql=mysqlnd \
–with-mysqli=mysqlnd \
–with-pdo-mysql=mysqlnd \
–with-xmlrpc \
–with-xsl=/usr \
–without-pear \
–with-libxml-dir=/usr \
–with-iconv-dir=/usr/local \
–with-gd \
–with-jpeg-dir=/opt/local \
–with-png-dir=/opt/local \
–with-freetype-dir=/opt/local \
–with-mcrypt=/opt/local \
–with-openssl \
–enable-debug –enable-maintainer-zts \
–enable-pthreads –enable-mbstring \
–enable-fpm

Linux Ebury

ssh -G 2>&1 | grep -e illegal -e unknown > /dev/null && echo "System clean" || echo "System infected"

dhcpv6 config

http://linux.ardynet.com/ipv6setup.php

Ping with timestamp

ping 192.0.0.0 | perl -nle ‘print scalar(localtime), ” “, $_’

nmap cheatsheet

http://pen-testing.sans.org/blog/2013/10/08/nmap-cheat-sheet-1-0

iser target login