Posted in Linux

Some Linux commands I use often

Get the total size of some files:

du -ch /path/patern* | grep total

Get the total number of files being backed up using the log of the RMAN job:

grep -i 'input datafile file number=' rman_BKUP.log | wc -l

Use grep to display the next 2 lines after the pattern you’re looking for (-A= AFTER , B=BEFORE):

grep -i -A 2 'input datafile file number'  rman_BKUP.log
input datafile file number=00001 name=/storage/datafile.dbf
channel ch02: starting piece 1 at 14-MAR-18 15:30:25
channel ch01: finished piece 1 at 14-MAR-18 15:30:32
Advertisements
Posted in Linux, Oracle, Virtualbox

X11 forwarding request failed on channel 0

I got this error while trying to redirect my display to the local host.

marius$ ssh -X oracle@rac1
Warning: the ECDSA host key for 'rac1' differs from the key for the IP address '192.168.100.101'
Offending key for IP in /Users/marius/.ssh/known_hosts:10
Matching host key in /Users/marius/.ssh/known_hosts:13
Are you sure you want to continue connecting (yes/no)? yes
oracle@rac1's password:
X11 forwarding request failed on channel 0
Last login: Mon Apr 25 18:02:35 2016 from 192.168.100.1
[oracle@rac1 ~]$

The solution that I’ve found is this one: just set the X11UseLocalhost to “no” (in my case was set to “yes”):

vi /etc/ssh/sshd_config
...............
X11Forwarding yes
#X11DisplayOffset 10
X11UseLocalhost no
................