Linux

How to add bridge network

Problem Statement: You might have created VM in your laptop which is running on different network segment 10.x.x.x. your laptop is running on wired/wireless network on different segment 192.168.x.x. Now we need to bridge these two network to transfer files and access internet. How to achieve it? Solution: In your VM add another network interface as bridged network device name is
Read More »

How to scp from remote server multiple files

What is Secure Copy? scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh. Basic syntax of SCP scp source_file_name username@destination_host:destination_folder “copy source_file_name” into “destination_folder” at “destination_host” using “username account”. How to copy single file $scp -p username@hostname:/u01/local/oracle/db_01/backup/<FileName> .  
Read More »

How to rotate log files

We can use simple linux commands to rotate logs. There are some tools also available to rotate the logs. Method 1: Backup the log and make the log empty without stopping the service. 1.1 Backup the current Log $ tail -100000 alert_UPGR.log > alert_UPGR.log.bak $ ls -ltr alert_UPGR.log* -rw-r—– 1 oracle oinstall 353665 Jul 4 00:41 alert_UPGR.log -rw-r–r– 1 oracle
Read More »

How to run shell script in background

We need sometime run the script in background 1. How to execute the script in Background Let us say you have created script call test_bg.sh Login to remote host with appropricate username and password Syntax $ nohup <scriptname> > <logname> & Example: $ nohup /home/oracle/mudhalvan/scripts/test_bg.sh > /home/oracle/mudhalvan/scripts/test_bg.log & 2. How to check any background jobs are running in this session
Read More »