Examples
To create a directory named Taxes with a subdirectory named Property, which contains a subdirectory named Current, type:
mkdir \Taxes\Property\Current
This is the same as typing the following sequence of commands with command extensions disabled:
mkdir \Taxes
chdir \Taxes
mkdir Property
chdir Property
mkdir Current
Essential Commands
| Lists names of files in current directory (folder) |
| Lists all files whose names start with Hello. |
| Changes directory to C:\files ("absolute" pathname) |
| Changes directory to myfiles subdirectory of current directory ("relative" pathname) |
| Changes directory to "parent" of current directory |
| MS-DOS text editor, used to create and edit ASCII textfiles |
| Displays contents of ASCII textfile on screen |
| Ends command interpreter, makes console window go away... |
Useful File Management Commands
| Copies contents of Test1.java to new file Test2.java |
| Renames Test1.java to Test2.java |
| Deletes Test1.java (Be careful with this command...) |
| Deletes all files with Test1 prefix (Be even more careful with this command...) |
| Creates new directory playpen as subdirectory of current directory |
| Removes directory playpen (must be empty) |
Commands for Compiling and Running Java Applications
Note: if the commands in this table are not recognized by the MS-DOS command interpreter on your system, try using the path commands listed below...
| Compiles Java source file Hello.java (ASCII textfile), |
| "Runs" Java application: starts Java Virtual Machine (interpreter), |
Using javadoc to Document Java Classes
Note: if the commands in this table are not recognized by the MS-DOS command interpreter on your system, try using the path commands listed below...
| Generates Web document Cat.html, containing description of Cat class. Complete documentation requires inclusion of javadoc comments (/** .. */) in source code. |
Jar (Java Archive) Commands
Note: if the commands in this table are not recognized by the MS-DOS command interpreter on your system, try using the path commands listed below...
| Creates Pets.jar, containing compressed version of Pets folder and all its contents |
| Displays list of zipped files in Pets.jar |
| Extracts (unzips) entire contents of Pets.jar, preserving any directory structures |
Useful FTP Commands
| Attempts to start anonymous FTP session on remote Computer Science server. Enter ftp for userid and your bulldog email address for password. |
| Attempts to start FTP session on remote Computer Science server candler.cs.unca.edu. You will need to provide your CSCI userid and password for this host. |
| FTP command to set data transfer mode to ASCII (default, suitable for .java source files and other textfiles) |
| FTP command to set data transfer mode to binary (suitable for .class files and other binary files) |
| FTP command to display status, including current data transfer mode (ASCII or binary) |
| FTP command to change current directory on remote host |
| FTP command to change current directory on local system |
| FTP command to copy file Hello.java from current directory on local system to current directory on remote host |
| FTP command to copy all files ending with .java from current directory on local system to current directory on remote host |
| FTP command to end session, breaks contact with remote host |
No comments:
Post a Comment