Archive

Posts Tagged ‘Linux’

Useful Linux Command for Oracle DBA

September 11th, 2014 No comments

I have listed herewith some useful Linux command for Oracle Database Administrator. All commands are tested with Red Hat Enterprise Linux 5.

List the partition tables for Hard Disk Capacity

[root@linuxbox ~]# fdisk -l

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000080

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          17      131072   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              17         539     4194304   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3             539       19453   151922688   83  Linux
[root@linuxbox ~]# 
Categories: Linux Tags:

Linux System Info

May 29th, 2013 1 comment

How to get System Information for Linux from Command Line?

How to get Kernel Version and System Architecture for Linux from Command Line?
uname -a

[root@shlpaysil ~]# uname -a
Linux shlpaysil 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux

How to get Name and Version of Distribution for Linux from Command Line?
head -nl /etc/issue

[root@shlpaysil ~]# head -nl /etc/issue
Red Hat Enterprise Linux Server release 5 (Tikanga)

Display All Registered Partitions on the System
cat /proc/partitions

[root@shlpaysil ~]# cat /proc/partitions
major minor #blocks name
8 0 71687325 sda
8 1 32098 sda1
8 2 409657 sda2

Hard Drive Information:
fdisk -l

[root@shlpaysil ~]# fdisk -l
Disk /dev/sda: 73.4 GB, 73407820800 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Memory Information:
grep MemTotal /proc/meminfo

[root@shlpaysil ~]# grep MemTotal /proc/meminfo
MemTotal: 1035156 kB

Display CPU Information:
grep “model name” /proc/cpuinfo

[root@shlpaysil ~]#grep "model name" /proc/cpuinfo
model name : Intel(R) Xeon(TM) CPU 3.00GHz
model name : Intel(R) Xeon(TM) CPU 3.00GHz

Get System Manufacturer Name:
dmidecode -s system-manufacturer

[root@shlpaysil ~]# dmidecode -s system-manufacturer
Dell Computer Corporation

Display System Product Name:
dmidecode -s system-product-name

[root@shlpaysil ~]# dmidecode -s system-product-name
PowerEdge 1850

Display BIOS Release Date:
dmidecode -s bios-release-date

[root@shlpaysil ~]# dmidecode -s bios-release-date
01/19/2005

Get CD/DVD RW Info:
cat /proc/sys/dev/cdrom/info

[root@shlpaysil ~]# cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.20 2003/12/17
Categories: Linux Tags:

How can I Quit vi Editor without Saving Changes?

January 20th, 2013 No comments

To quit the vi editor without saving any changes you’ve made, perform the following command:

Type colon (:)
Type q! after colon and press enter

Any changes made are lost and quit from vi editor.

If you are currently in insert or append mode, press Esc.

Categories: Linux Tags:

How to Configure XManager on Linux

January 7th, 2013 1 comment

Open /etc/gdm/custom.conf and edit the security and xdmcp section like the followings:

[daemon]
RemoteGreeter=/usr/libexec/gdmgreeter

[security]
AllowRemoteRoot=true

[xdmcp]
Enable=true

[gui]

[greeter]

[chooser]

[debug]

Restart the system by the command:

reboot

Categories: Linux Tags: ,

How to Zip a File in Linux

January 6th, 2013 No comments

First navigate to the directory which the file resides:

cd /home/oracle

Then enter the following command:

zip data.zip SHLHCMDB_FULL_20130106.dmp

Press Enter

Categories: Linux Tags: