Frequently Used Linux Commands for System & Oracle DBA Operations
As an Oracle DBA or Linux system administrator, we frequently perform operational tasks such as checking port usage, cleaning old files, troubleshooting network issues, and monitoring disk space.
This post documents commonly used Linux commands that are extremely helpful in day-to-day DBA activities, along with examples for better understanding.
1. How to Check Port Availability
Using lsof
This command identifies which process is using a specific TCP port.
Sample Output:
Using netstat
This command displays active network connections and listening ports.
Sample Output:
2. Renaming Multiple Characters in a File
This method is useful when you want to replace a specific word throughout a file.
Syntax
Example
This command replaces all occurrences of DEV with TEST in the file.
3. Checking Connection Issues
DNS Resolution Check
Used to verify hostname-to-IP resolution.
Sample Output:
Oracle Listener Connectivity Check
Sample Output:
4. Searching Multiple Parameters in a Single Command
Useful for validating applied Oracle patches.
Sample Output:
5. Tar Command (Archive and Extract Files)
Create Archive
Sample Output:
Extract Archive
6. Nohup Command
The nohup command allows a process to continue running even after you log out.
Sample Output:
Monitor Running Jobs
7. Deleting Old or Large Files
List Files Older Than 5 Days
Delete Files Older Than 5 Days
Sample Output:
8. Moving Old Files to Another Directory
List Files Older Than 4 Days
Move Files
9. Find Top Disk Space Consuming Files
Sample Output:
10. Network Connectivity Testing
Using Netcat
Sample Output:
Comments
Post a Comment