Unix/Linux For DBA
It is imperative for DBA's to have knowlegde on few Linux commands :
cd - Enables us to change directories
date - gives us the time and date
echo - we can display text on our screen
grep - It is a pattern recognition command.It enables us to see if a certain word or set of words occur in a file or the output of any other command.
history - gives us the commands entered previously by us or by other users
passwd - this command enables us to change our password
pwd - to find out our present working directory or to simply confirm our current location in the file system
uname - gives all details of the system when used with options. We get details including systemname,kernel version etc.
whereis - gives us exact location of the executable file for the utility in the question
which - the command enables us to find out which version(of possibly multiple versions)of the command the shell is using
who - this command provides us with a list of all the users currently logged into the system
whoami - this command indicates who you are logged in as. If user logs in as a userA and does a su to userB,whoami displays userA as the output.
man - this command will display a great detail of information about the command in the question
find - this command gives us the location of the file in a given path
more - this command shows the contents of a file,one screen at a time
ps - this command gives the list of all processes currently running on our system
cat - this command lets us to read a file
vi - this is referred to as text editor that enables us to read a file and write to it
emacs- this is a text editor that enables us to read a file and write to it
gedit - this editor enables us to read a file and write to it
diff - this command compares the two files, returns the lines that are different,and tells us how to make the files the same
export - we can make the variable value available to the child process by exporting the variable.This command is valid in bash,ksh.
setenv - this is same as export command and used in csh,tcsh
env - to display the set of environment variables at the prompt
echo <$variablsname> - displays the current value of the variable
source - whenever an environment variable is changed, we need to export the changes.source command is used to put the environment variable changes into immediate effect.It is used in csh,tcsh
.profile - in ksh,bash use . .profile command to get same result as using source command
set noclobber - to avoid accidental overwriting of an existing file when we redirect output to a file.It is a good idea to include this command in a shell-startup file such as .cshrc