Posts

Showing posts from February, 2007

find out all failed login attempts via ssh/telnet

how do I find out all failed login attempts via ssh/telnet? # grep "authentication failure" /var/log/messages|awk '{ print $13 }' | cut -b7- | sort | uniq -c

find command with examples

find command all we know but here u find some example, find . -name "rc.conf" -print This command will search in the current directory and all sub directories for a file named rc.conf. find /usr/src -not \( -name "*,v" -o -name ".*,v" \) '{}' \; -print This command will search in the /usr/src directory and all sub directories. All files that are of the form '*,v' and '.*,v' are excluded. Important arguments to note are: * -not means the negation of the expression that follows * \( means the start of a complex expression. * \) means the end of a complex expression. * -o means a logical or of a complex expression. In this case the complex expression is all files like '*,v' or '.*,v' The above example is shows how to select all file that are not part of the RCS system. This is important when you want go through a source tree and modify all the source files... but ... you don't want