Previous Section  < Day Day Up >  Next Section

LAB 10: REDIRECTION

  1. What are the names of the three file streams associated with your terminal?

  2. What is a file descriptor?

  3. What command would you use to do the following:

    1. Redirect the output of the ls command to a file called lsfile?

    2. Redirect and append the output of the date command to lsfile?

    3. Redirect the output of the who command to lsfile? What happened?

  4. Perform the following:

    1. Type cp all by itself. What happens?

    2. Save the error message from the above example to a file.

    3. Use the find command to find all files, starting from the parent directory, of type directory. Save the standard output in a file called found and any errors in a file called found.errs.

    4. Take the output of three commands and redirect the output to a file called gottem_all.

    5. Use a pipe(s) with the ps and wc commands to find out how many processes you are currently running.

    Previous Section  < Day Day Up >  Next Section