UNIX Interview Questions for Oracle DBAs
1) What’s the difference between soft link and hard link?
Ans:
A symbolic (soft) linked file and the targeted file can be located on the same or different file system while for a hard link they must be located on the same file system, because they share same inode number and an inode table is unique to a file system, both must be on the same file system.
2) How you will read a file from shell script?
Ans:
while read line
do
echo $line
done < file_name
3) 3. What’s the use of umask?
ANS:
Will decide the default permissions for files.
4) What is crontab and what are the arguments?
Ans:
The entries have the following elements:
field allowed values
----- --------------
minute 0-59
hour 0-23
day of month 1-31
month 1-12
day of week 0-7 (both 0 and 7 are Sunday)
user Valid OS user
command Valid command or script
? ? ? ? ? command
| | | | |_________day of the week (0-6, 0=Sunday)
| | | |___________month (1-12)
| | |_____________day of the month (1-31)
| |_______________hour (0-23)
|_________________minute (0-59)
5) How to find operating system (OS) version?
Ans:
uname –a
6) How to find out the run level of the user?
Ans:
uname –r
7) How to delete 7 days old trace files?
Ans:
find ./trace –name *.trc –mtime +7 –exec rm {} \;
8) What is top command?
Ans:
top is a operating system command, it will display top processes which are taking high cpu and memory.
9) 8. How to get 10th line of a file (by using grep)?
Ans:
A symbolic (soft) linked file and the targeted file can be located on the same or different file system while for a hard link they must be located on the same file system, because they share same inode number and an inode table is unique to a file system, both must be on the same file system.
2) How you will read a file from shell script?
Ans:
while read line
do
echo $line
done < file_name
3) 3. What’s the use of umask?
ANS:
Will decide the default permissions for files.
4) What is crontab and what are the arguments?
Ans:
The entries have the following elements:
field allowed values
----- --------------
minute 0-59
hour 0-23
day of month 1-31
month 1-12
day of week 0-7 (both 0 and 7 are Sunday)
user Valid OS user
command Valid command or script
? ? ? ? ? command
| | | | |_________day of the week (0-6, 0=Sunday)
| | | |___________month (1-12)
| | |_____________day of the month (1-31)
| |_______________hour (0-23)
|_________________minute (0-59)
5) How to find operating system (OS) version?
Ans:
uname –a
6) How to find out the run level of the user?
Ans:
uname –r
7) How to delete 7 days old trace files?
Ans:
find ./trace –name *.trc –mtime +7 –exec rm {} \;
8) What is top command?
Ans:
top is a operating system command, it will display top processes which are taking high cpu and memory.
9) 8. How to get 10th line of a file (by using grep)?
Comments
Post a Comment