CIT 042 Index > Operating System Interface > Sample session output

Sample Session Output

On this page, everything that the user types shows up in bold red like this. Note that the perl program is executed once only, with no command line arguments. The program prompts you for commands repeatedly until you tell it to quit.

F:\web\cit042>perl filemgr.pl
Enter command > cd

Enter command > pwd
C:/Documents and Settings/CIT31

Enter command > cd c:\temp

Enter command > ls .
Unrecognized command ls

Enter command > list .
--- Directory .
.                             [directory]
..                            [directory]
calendar                      [directory]
cvwa.pl                       4737
events.html                   11545
file1                         11545
file2                         4737
got_java.jar                  830
--- end of directory .

Enter command > list got_java.jar calendar xyz
got_java.jar                  830
--- Directory calendar
.                             [directory]
..                            [directory]
admin                         [directory]
index.xtml                    818
la.gif                        67
makedb.pl                     3042
printstyle.css                1904
ra.gif                        67
--- end of directory calendar
xyz does not exist.

Enter command > del file1 file3 events.html
File file3 does not exist.

Enter command > list .
--- Directory .
.                             [directory]
..                            [directory]
calendar                      [directory]
cvwa.pl                       4737
file2                         4737
got_java.jar                  830
--- end of directory .

Enter command > create file3 plan9

Enter command > list .
--- Directory .
.                             [directory]
..                            [directory]
calendar                      [directory]
cvwa.pl                       4737
file2                         4737
file3                         0
got_java.jar                  830
plan9                         0
--- end of directory .

Enter command > quit