Unix interview questions

Posted on 2006-04-02
Last Modified: 2013-12-26
Hi Experts,

 I have a list of interview questions whih I need answer from you. Please help me on this.

1) Unix command to copy the files with name containing test from /export/home to /tmp/dir2
2) If I need to run large number of jobs in the night what utility I will use
3)How to find the available space in a particular directory
4)what is soft link and hard link
5)Command to copy a file from directory /export/home/users in machine1 to /tmp/dir/ in machine2.

Question by:nmretd
    LVL 3

    Accepted Solution

    Answer to Q5>
    scp -r /export/home/users/filename IPAddress_of_Mac2:/tmp/dir


    scp -r /export/home/users/filename

    I will soon give the rest of the answers, actually at this instance I unable to remember them.

    Prashant Sabnekar
    LVL 51

    Assisted Solution

    how about reading a book?
    1) cp
    2) whatever you feel comfortable with (cron at scripts:)
    3) depends on your filesystem capabilities, if there is no quota the question is useless
    4) soft link is a special inode with reference to another resource/target, hard link just increments the use counter in an inode and adds an additional name for it
    5) rcp, scp, ftp, wget, curl, and many many more ...
    LVL 38

    Assisted Solution

    It it is a entry level position, you can tell the interview panel what you know about
    Unix, and you wish to learn (faster learner?).

    If you gave a *nix (linux, Unix) system, login to the system and do:

    man cp
    man tar
    man df
    man ln
    man crontab
    man cron

    It will give you the answers for the questions.

    If it is not the entry level position, you should skip the interview for this time.
    stay at home and start to learn *nix. Install Linux/Unix in your PC, play with the system. please have a look at the links in:


    Good luck !

    LVL 3

    Expert Comment

    Answer to Q1>>>
    cp /export/home/test* /tmp/dir2/

    How to find the available space in a directory.

    Look directory is not a drive to have something like free space or available space, It will have size, that you can find out by typing ll command, or programatically by using fcntl.

    Good Luck

    LVL 4

    Assisted Solution

    by:Vinit Kain
    you can find space used by a directory by

    du -ks /your_directory

    or can find the space available on filesystem

    df -k .
    LVL 51

    Expert Comment

    > you can find space used by a directory by
    .. but the question was "available space"
    The interviewer knows why :-))
    LVL 4

    Expert Comment

    by:Vinit Kain
    >> .. but the question was "available space"
    The interviewer knows why :-))

    I Know,

    But if this question is asked to me in any interview, I will tell the same what I posted.

    LVL 48

    Assisted Solution


    You said:

    >you can find space used by a directory by

    >du -ks /your_directory

    That's "incorrect" if there are sub directories, but then again it's an poorly worded question.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Suggested Solutions

    Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
    Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now