Explain the read, write, and execute permissions on a UNIX directory?
ans:In unix the default permission on a unix directory is 755 is the same as rwxr-xr-x.
where r-read(4),w-write(2),x-execute(1)
so rwx implies 4+2+1=7.
7: iostat returns disk and other data i/o statistics vmstat returns memory paging statistics, virtual and real, netsta returns network statistics. GENERALLY the first line or the command alone will return statistical averages since boottime; the commands can also be run with flags to report instantaneous snapshots every x seconds for y results (ie vmstat 5 5 gives a snapshot every 5 seconds 5 times in a row
8: vi to substitute every occurance in a file: %s/OLD/NEW/g
9.shared memory and semaphores: shmmmax, shmmmin, etc and seminfo_semmsl (both affect the memory useage and sharing at the kernel level and usually a reboot is necessary for them to take affect safely (kernel parameters can be updated live on many Unix OS’s but is not recommended unless you are at the expert level and have performed the task before successfully on a sandbox)
10: Oracle can be installed from CD or better yet from CD’s copied in their entirety to a hard disk simply with the “runInstall” script. a) make sure the filesystems you will be installing to have enough space AND no previous Oracle installation upon them and b) MUST be run as the Oracle user NOT root. (ie: you need to have an oracle user account created with the proper rwx rights to the installation target filesystem) c) several key variables such as hostname, some kernel parameters, and a few other pre-installation tasks need to be performed dependent upon the OS Oracle will be run upon.
12 Comments on Unix admin questions
1 How do you list the files in an UNIX directory while also showing hidden files?
ans: ls -a
2. How do you execute a UNIX command in the background?
ans: &
3 What UNIX command will control the default file permissions when files are created?
ans: umask
5. What is the difference between a soft link and a hard link?
ans: hard link means two inodes link to same file. soft link creates a seperate file
6 Give the command to display space usage on the UNIX file system?
ans: df
6 Give the command to display space usage on the UNIX file system?
ans: du
1.) ls -al
Explain the read, write, and execute permissions on a UNIX directory?
ans:In unix the default permission on a unix directory is 755 is the same as rwxr-xr-x.
where r-read(4),w-write(2),x-execute(1)
so rwx implies 4+2+1=7.
7: iostat returns disk and other data i/o statistics vmstat returns memory paging statistics, virtual and real, netsta returns network statistics. GENERALLY the first line or the command alone will return statistical averages since boottime; the commands can also be run with flags to report instantaneous snapshots every x seconds for y results (ie vmstat 5 5 gives a snapshot every 5 seconds 5 times in a row
8: vi to substitute every occurance in a file: %s/OLD/NEW/g
9.shared memory and semaphores: shmmmax, shmmmin, etc and seminfo_semmsl (both affect the memory useage and sharing at the kernel level and usually a reboot is necessary for them to take affect safely (kernel parameters can be updated live on many Unix OS’s but is not recommended unless you are at the expert level and have performed the task before successfully on a sandbox)
10: Oracle can be installed from CD or better yet from CD’s copied in their entirety to a hard disk simply with the “runInstall” script. a) make sure the filesystems you will be installing to have enough space AND no previous Oracle installation upon them and b) MUST be run as the Oracle user NOT root. (ie: you need to have an oracle user account created with the proper rwx rights to the installation target filesystem) c) several key variables such as hostname, some kernel parameters, and a few other pre-installation tasks need to be performed dependent upon the OS Oracle will be run upon.
5. CORRECT answer: (a link NEVER creates another copy of a file, only an inode pointer to a file or a file name)
Hard links create inode pointers to a files’ actual location and can only be created on the same filesystem
Soft links create an inode pointer to a file NAME and can be created to point to a file on ANOTHER filesystem.
Ans to Qn 8
itz like find and replace in MS Word
Esc
:1,$s/old_word/new_word/g
Ans 6:- df -h
Give the command to display space usage on the UNIX file system?
ans:-
df -h
4th question’s answer:->
4->read
2->write
1->execute
root have full permission-> 777
777(4+2+1).
rwxrwxrwx–>means
first rwx –> user
second rwx–> group
third rwx –> other
777 means full permission.
—————-
apply permission
—————-
chmod 755
755 means–>
user have full permission
group&others have read and execution.
5th questions answer is:->
softlink have different inode and permissions started with l.
hardlink have samw node and permission not start with l.
softlink–>
ln -s file newfile
//-s is symbolic(soft)
ll -il //shows file with inode.
newfile->file
——————————–
hardlink–>
ln file newfile
ll -il
8th questions ans:->
s/existing word/new word/gi