Suppose that your HOME directory is /users/steve. Assuming that you just logged in to the system and executed the following commands:

$ docs=/users/steve/documents
$ let=$docs/letters
$ prop=$docs/proposals
Write the commands in terms of these variables to:
a. List the contents of the documents directory.
b. Copy all files from the letters directory to the proposals directory.
c. Move all files whose names contain a capital letter from the letters directory to the current directory.
d. Count the number of files in the memos directory.


a. List the contents of the documents directory:
ls $docs
b. Copy all files from the letters directory to the proposals directory:
cp $let/* $prop
c. Move all files whose names contain a capital letter from the letters directory to the current directory:cp $let/*[A-Z]* .
d. Count the number of files in the memos directory:
ls $doc/memos/* | wc -l

Computer Science & Information Technology

You might also like to view...

Which of the following statements about the following code is false? word_counts = {} for word in text.split(): if word in word_counts: word_counts[word] += 1 else: word_counts[word] = 1

a. The expression text.split() tokenizes text by calling string method split, which separates the words using the method’s delimiter string argu-ment—if you do not provide an argument, split uses a space. b. Method split returns a list of tokens (that is, the words in text). c. The expression word_counts[word] += 1 inserts a new key-value pair in the dictionary. d. All of the above statements are true.

Computer Science & Information Technology

For a smaller file size with often-adequate image quality, try setting the JPEG quality value between ____.

A. 50 and 79 B. 79 and 85 C. 85 and 100 D. 90 and 100

Computer Science & Information Technology

Digital signatures are used for which of the following?

a. To encrypt a message b. To ensure message confidentiality c. To prove the identity of the sender of the message d. To ensure the message cannot be opened by anyone but the sender

Computer Science & Information Technology

Which of the following is not a feature displayed by all packet sniffers?

a. Source IP address of the packet b. Destination IP address of the packet c. Statistical analysis of the packet d. Protocol of the packet

Computer Science & Information Technology