FIND Command
-------------------------------------------------------------------------------
To find the files with exactly the same size as shown by ls –l
find . –size +10000c –size –32000c -print
To find files with range of sizes
find . –size +10000c –size –32000c -print
To search for files with specific permissions
find . –name \*.0 –perm 664 -print
To check with directories with 777 permissions
find . –type d –perm 777 -print
To search by Owner and Group
find . –user root -perm –4000 –print
find . –group staff –perm –2000 –print
This will print a list of files modified less than two days ago.
When you've been working on something and have
forgotten the name of it, this sometimes helps!
find . -mtime -2 –print
To find the files with exactly the same size as shown by ls –l
find . –size 2400c –print
To find files with range of sizes
find . –size +10000c –size –32000c -print
To search for files with specific permissions
find . –name \*.0 –perm 664 -print
To search by Owner and Group
find . –user root -perm –4000 –print
find . –group staff –perm –2000 –print
Remove all files in current directory which have not been
accessed for more than 5 days
find . \( -name '*.*' -o -name ‘*’ \) -atime +5 -exec rm {} \;
Find command to find a word in the directory and sub directory
find . -exec grep -ls pkzip {} \;
To kill all oracle processes
Kill –9 `ps –ef | awk ‘$1==”oracle” {print $2}’`
To kill all concurrent programs
kill -9 `ps -ef | awk '$10=="FND" { print $2 }'`
To list the mount points
df –v
To change all the group to dba group
chgrp dba * |