- 论坛徽章:
- 0
|
CIS 130 Final Exam
Part 2 of 2
2 Points Each
PERIODICALLY SAVE YOUR WORK ON A FLOPPY DISK
(In Linux, use Red Hat - system tools - disk management to mount and unmount your floppy disk).
Create a LINUX batch file to accomplish the following:
1 Clear the screen
2 Display the current time and date
3 Ask the user for the name of a path Hint: Try using read var. Remember, in Linux, a system variable is substituted by using a dollar sign (e.g., $var) 4 instead of encapsulation with % marks (e.g., %var%) as in DOS.
5 Ask the user for the name of a root directory
6 Create the root directory using the target path
7 Ask the user for the name of a first subdirectory
8 Create the first subdirectory in the root directory
9 Ask the user for the name of a second subdirectory
10 Create the second subdirectory in the first subdirectory directory
11 Ask the user to enter a first filename
12 Ask the user to enter some text for the first file
13 Create the first file in the first subdirectory using the text the user entered
14 Ask the user to enter a second filename
15 Ask the user to enter some text for the second file
16 Create the second file in the second subdirectory using the text the user entered
17 Display the directory contents of the directory structure you created above
18 Display the contents of each file
19 Display to the user text to allow the user to choose a choice of times: choice 1 is 9:10, choice 2 is 9:30, choice 3 is 9:40
20 Ask the user to make a choice
21 Display the user's choice
22 Create a different batch file to display the user's choice of time. (Do not use cron to schedule a task).
23 Run the choice display batch file from your main batch file
24 Remove the files you created
25 Remove the directories you created
26 Remove any system variables you created
Linux的
大家能做出几题?
要求全部写在一个能运行的文件里 |
|