Unix admin questions

  1. How do you list the files in an UNIX directory while also showing hidden files?
  2. How do you execute a UNIX command in the background?
  3. What UNIX command will control the default file permissions when files are created?
  4. Explain the read, write, and execute permissions on a UNIX directory.
  5. What is the difference between a soft link and a hard link?
  6. Give the command to display space usage on the UNIX file system.
  7. Explain iostat, vmstat and netstat.
  8. How would you change all occurrences of a value using VI?
  9. Give two UNIX kernel parameters that effect an Oracle install
  10. Briefly, how do you install Oracle software on UNIX.
This entry was posted in Unix/Linux. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

12 Comments on Unix admin questions

  1. mzhb
    Posted 7/4/2008 at 12:19 pm | Permalink

    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

  2. sbao321
    Posted 8/3/2008 at 12:07 am | Permalink

    6 Give the command to display space usage on the UNIX file system?
    ans: du

  3. Hitesh
    Posted 8/28/2008 at 1:57 am | Permalink

    1.) ls -al

  4. kranthi kumar
    Posted 9/2/2008 at 3:51 pm | Permalink

    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.

  5. Posted 9/12/2008 at 9:22 am | Permalink

    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.

  6. Posted 9/12/2008 at 9:28 am | Permalink

    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.

  7. Rahul
    Posted 10/5/2008 at 2:57 am | Permalink

    Ans to Qn 8
    itz like find and replace in MS Word

    Esc
    :1,$s/old_word/new_word/g

  8. Sripati
    Posted 11/18/2008 at 7:32 am | Permalink

    Ans 6:- df -h

  9. Posted 12/24/2008 at 5:52 am | Permalink

    Give the command to display space usage on the UNIX file system?

    ans:-

    df -h

  10. Posted 12/24/2008 at 6:04 am | Permalink

    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.

  11. Posted 12/24/2008 at 6:23 am | Permalink

    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

  12. Posted 12/24/2008 at 6:29 am | Permalink

    8th questions ans:->
    s/existing word/new word/gi

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*