You are on page 1of 1

8/22/2014

VijayKumar_SOA

Useful UNIX Commands


# OS version and Details
uname -a
# Replace ^m
:%s/^V^M//g
# To Get the Delimited value
cut -f5 -d \~
#Mail Server Details
Look for relay Host in the below file.
more /etc/mail/sendmail.cf
# Find a word in
find . -exec grep hello {} \; -print
#To find a file in any directory, starting in your current directory
$ find . -name filename
#If you do not know the complete filename,use the wildcard \* at the start and end of the filename.
$ find . -name \*partialfilename\* -print
#Find only files (not directories) from your current directory. For example,
$ find . -type -f -print
#And to find only directory files,type
$ find . -type -d -print
#To find all files containing a particular string
$ find . -name "\*" -exec grep "string" {} \\; -print
#To find all files that are greater than "n" bytes and have not been accessed for more than "x" days,
$ find . -type f -size +nc -atime +x
For example, to find a file greater than 800 bytes and not accessed for more than 10 days, type
$ find . -type f -size +800c -atime +10
The c indicates that the file size is in bytes.

http://soavijaya.blogspot.in/search?updated-min=2012-01-01T00:00:00-08:00&updated-max=2013-01-01T00:00:00-08:00&max-results=8

1/1

You might also like