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...

The ________ in Word displays Microsoft Office Backstage view

A) FILE tab B) Quick Access Toolbar C) Title bar D) Status bar

Computer Science & Information Technology

The move(), turn(), and roll() messages ____.

A. can have no arguments B. require two arguments C. require one argument D. can have any number of arguments

Computer Science & Information Technology