Question: Please make sure that you type in the command as it is from your unix shell or just capture a screen shot and paste it

Please make sure that you type in the command "as it is" from your unix shell or just capture a screen shot and paste it in your homework file.

  • No command should be written without being tested.
  • No command should be typed in starting with uppercase letter.

  1. Give 3 examples of what file names would match the following pattern and give me 3 examples of what file names would not match the following patterns:
    1. Lec*
    2. file??.pdf
    3. [abc]_sample.?
    4. [A-Z,a-z][0-9].mp3
    5. [bf][ao][ro].mp?

  1. Determine how many accounts in the /etc/passwd file have /usr/bin/bash as their shell. (Hint: Use grep and wc)

  2. Using ps Determine how many instances of bashare running on the current machine (across all users). (Hint: Use ps aef and wc)
  3. Using redirection, how would you create a file that contains the list of users currently logged in. (Hint: Use w, cut and redirection >. You will need to read up on w to use the right options).
  4. Try running ls al and then ls al *
    1. what is the difference?
    2. what is the wildcard * bringing in?
  5. To issue multiple commands in one line, you can separate the commands with a: ______
    1. Show me a line with multiple commands.
  6. How would you print My favorite file is /etc/passwd
  7. Use the find command to display all files in /etc directory that ends with .conf
  8. Use find to display all files from root which have write permissions for all (user, group, other)
  9. Use the mancommand to find the meaning of the options of the find command listed below:
    1. inum
    2. links
  10. What is the difference between atime and mtime options in find

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!