Read the following scenario. Provide the command(s) in context of the environment established in the scenario. Write your answers on the line under each question.

1. Make 2 new directories called mydir and backup
2. Copy all files from current directory to backup directory
3. Move all files from current directory to mydir directory
4. Change to mydir directory
5. List files which have .cpp extension
6. List all files with prefix file
7. List all files with postfix file
8. List all files that start with the letter W or w
9. Delete file1, file2, file3, and file4 using one command line
10. Delete all files with postfix .cpp, and ask for confirmation before deletion
11. Change file1 name to oldfile1
12. Change to your home directory
13. Remove mydir directory (note: you have files in mydir directory)
14. Change to backup directory and delete all files
15. Remove all files from the backup directory


1. Make 2 new directories called mydir and backup
=>>mkdir mydir
mkdir backup
2. Copy all files from current directory to backup directory
=>> cp * backup
3. Move all files from current directory to mydir directory
=>> mv * mydir
4. Change to mydir directory
=>> cd mydir
5. List files which have .cpp extension
=>> ls * .cpp
6. List all files with prefix file
=>>ls file*
7. List all files with postfix file
=>>la *file
8. List all files that start with the letter W or w
=>>ls [Ww]
9. Delete file1, file2, file3, and file4 using one command line
=>>rm file[1-4]
10. Delete all files with postfix .cpp, and ask for confirmation before deletion
=>>rm i *.cpp
11. Change file1 name to oldfile1
=>>mv file1 oldfile1
12. Change to your home directory
=>>cd
13. Remove mydir directory (note: you have files in mydir directory)
=>>rm r mydir14
14. Change to backup directory and delete all files
=>>cd backup
15. Remove all files from the backup directory
=>>rm*

Computer Science & Information Technology

You might also like to view...

Match the following five terms to their maximum storage capacities:

I. Currency A. 255 characters II. Number B. Until 9999 III. Date/Time C. Variable IV. Memo D. 999 Trillion V. Text E. 65,535 characters

Computer Science & Information Technology

A(n) accounting is information a function needs to make a calculation, and can consist of values (such as 100 or .02), cell references (such as B3), or range references (such as A9:G16).

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The _____ contains information about how to dispose of a particular chemical solvent

Fill in the blank(s) with correct word

Computer Science & Information Technology

Putting data in a variable is referred to as assigning a(n) ____ to it.?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology