jess LAND
       www.jessland.net
        Sponsored by:       
One eSecurity
www.one-esecurity.com
JISK Knowledgebase >>    About    News    Essentials    Architecture    FWs    IDS/IPS    Honeypots    Malware    Forensics   
  +  JSS Home    Projects    JSS Community    Events    News    Docs    About    Contact .

JLCorner > Jess > SANS > Tips > 10 UNIX Commands

10 UNIX Commands


less

grep

 egrep "/bin/ps$|/bin/netstat$" myfile.txt  Select lines ending by /bin/ps or /bin/netstat

awk

 awk '/firstmatch/,/lastmatch/' myfile.txt  Select a range of lines, starting with the line containing
                                            the string firstmatch and ending with the line that
                                            contains the line lastmatch
 awk '{print $NF}'                          Print the last column on the line

sort

 sort -n                                    Sort Numerically
 sort -u                                    Sort + Unique
 sort -k 5                                  Sort by the 5th field

sed


Copyright © 2000-2008 Jessland - Jess Garcia's Website - All rights reserved.