Sunday, January 29, 2012

how to search in solaris directory

lot's of way you can find in internet for searching directory, file in solaris, unix or linux. below is the another way to deal the issues.....

example for find command:

find . -print | grep -i "pattern"
find . -type f -print | grep -i "filename" # match files only
find . -type f -print | grep -i "*.c"
find . -type f -print | grep -i "foo.c"
find . -type d -print | grep -i "dirname" # match dirs only
find . -type d -print | grep -i "directory-name"


grep command example:


grep 'word' filename grep 'string1 string2'  filename cat otherfile | grep 'something' command | grep 'something' command option1 | grep 'data' grep --color 'data' fileName


if anythings more you need please mail me


No comments: