Useful Linux Command for Oracle DBA

--Create new tar

#tar -cvf tar_file_name.tar dirname/

--Extract from tar

#tar -xvf tar_file.tar

--view tar file

#tar -tvf tar_file_name.tar

--Search for given string

#grep -i "hostname" file_name

--Search for a given string in all files recursively

#grep -r "hostname" *

--Find file

#find -iname "filename"

--Execute commands on files found by the find command

#find -iname "filename" -exec rm -rf {} \;  --It will find the file and delete it.

--Find empty files in home directory