Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#changes line endings from windows to unix for file | |
sed -i 's/\r$//' /tmp/filename.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hostname=$1 | |
publicIP=$2 | |
privateIP=$3 | |
#change hostname and ip in /etc/sysconfig/network and /etc/hosts | |
cp -f /etc/hosts.bak /etc/hosts | |
cp -f /etc/sysconfig/network.bak /etc/sysconfig/network | |
sed -i "s/xxhostnamexx/$hostname/g" /etc/sysconfig/network /etc/hosts | |
sed -i "s/xxpublicipxx/$publicIP/g" /etc/hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
######################################################################### | |
# Script Name : oracle_sessions.sh | |
# Notes : List all ACTIVE database sessions | |
######################################################################### | |
sqlplus -s <<- ! | |
/ AS SYSDBA | |
SET LINES 160 | |
SET PAGES 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************ | |
Tablespace Information | |
*************************************************/ | |
--Show tablespace usage information | |
col "Tablespace" for a40 | |
col "Used MB" for 99,999,999 | |
col "Free MB" for 99,999,999 | |
col "Total MB" for 99,999,999 | |
SELECT df.tablespace_name "Tablespace", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import paramiko | |
import shutil | |
import hashlib | |
import os | |
class Server: | |
def __init__(self, hostname='', port=0, username='', password=''): | |
self.hostname = hostname | |
self.port = port | |
self.username = username |