Linux – Check differences in files between two directories
diff -r $ORACLE_HOME/OPatch/ /media/sf_Oracle/opatch/p6880880_121010_Linux-x86-64/Opatch/
diff -r $ORACLE_HOME/OPatch/ /media/sf_Oracle/opatch/p6880880_121010_Linux-x86-64/Opatch/
df -h | grep -v ^none | ( read header ; echo “$header” ; sort -rn -k 5)
What is rlwrap? rlwrap (readline wrapper) is a utility that provides command history and editing of commands for programs such as sqlplus, rman. Red Hat Linux 7 and OEL 7 Execute the commands as…
Display filenames only: grep -l dba *.trc (lowercase letter l as switch) Display filenames and matches grep -H dba *.trc Recursively find files and executes grep on each: find . -name “*.trc*” -exec -l dba…
Command Mode gg – beginning of file shift-g (G) – end of file Insert Mode Last Line Mode
On Linux, to delete files older than 10 days find /from/path -name ‘*.txt’ -type f -mtime +10 -exec rm {} \;
Linux free command info Play with Linux memory watch -d=cumulative vmstat -d # disk watch -d=cumulative vmstat -a # free active and inactive memory
ls -R | grep “:$” | sed -e ‘s/:$//’ -e ‘s/[^-][^\/]*\//–/g’ -e ‘s/^/ /’ -e ‘s/-/|/’
To search for a string (grep) in files recursively with Powershell (example): gci -recurse -include *.sql|%{gc $_} | %{$_|select-string “dba”} To get the filename(s): gci -recurse -include *.txt|%{$Filename=$_;gc $_} | %{$res=$_|select-string “dba”;if ($res) {Write-Host “$Filename”}}