Adding IP address in Oracle Linux can be done by editing the network-scripts. While this procedure is tested on Oracle Linux, i'm sure it should work on Redhat Enterprise Linux and other versions of Redhat . Editing network - scripts The network interface configuration files are found in the directory: /etc/sysconfig/network-scripts/ To add an IP address to an interface eth0 # cd /etc/sysconfig/network-scripts/ # vi ifcfg-eth0 Enter the below parameters for static configuration DEVICE="eth0" BOOTPROTO="static" BROADCAST="192.168.2.255" HWADDR="00:0C:29:DS:22:26" IPADDR="192.168.2.2" NETMASK="255.255.255.0" NETWORK="192.168.2.0" ONBOOT="yes" TYPE="Ethernet" Save the file by typing ESC :wq R estart the network service for the changes to take effect. # service network restart
//Enter command 'history' for history feature and CTRL - c to exit the 'osh>' shell /*Header files */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #define MAX_LINE 80 /* The maximum length of a command */ #define BUFFER_SIZE 50 #define buffer "\n\Shell Command History:\n" //declarations char history[10][BUFFER_SIZE]; //history array to store history commands int count = 0; //function to display the history of commands void displayHistory() { printf("Shell command history:\n"); int i; int j = 0; int histCount = count; //loop for iterating through commands for (i = 0; i<10;i++) { //command index printf("%d. ", histCount); while (history[i][j] != '\n' && hi...
The SELECT statement is used to select data from a database. The result is stored in a result table, called the result-set. To select only some columns you want you can use the following syntax: SELECT column_name , column_name FROM table_name ; By using the following syntax you select all columns of a table: SELECT * FROM table_name ; If you want to select only some records who fulfill a specific criterion, you can use the where clause: SELECT column_name , column_name FROM table_name WHERE column_name operator value ;
Comments
Post a Comment