Main » Articles » My articles |
INTERNAL COMMANDS:-
cd Change directory
cd .. : Move to the parent directory of the current directory. This command will make the current working directory "/home.
cd ~ : Move to the user's home directory which is "/home/username". The '~' indicates the users home directory.
cp Copy files
cp myfile yourfile : Copy the files "myfile" to the file "yourfile" in the current working directory. This command will create the file "yourfile" if it doesn't exist. It will normally overwrite it without warning if it exists.
cp -i myfile yourfile : With the "-i" option, if the file "yourfile" exists, you will be prompted before it is overwritten.
cp -i /data/myfile . : Copy the file "/data/myfile" to the current working directory and name it "myfile". Prompt before overwriting the file.
TIME : This lets you set your systems time. C:\time Current time is 1:46:11.30p Enter new time: C:\>
You don't need to specify the time to the nearest millisecond like DOS displays it, an hour and a minute will do. Notice the p at the end of the second line. That means it's P.M. You MUST put a p at the end of your new time or else your computer will be set to A.M. You can put an a there if you want an A.M. time, or you can just leave it blank.
EXIT :
This exits the current command shell. In windows it will close your DOS window. (Unless you have more than one instance of command.com running). If you are at a real DOS prompt (No windows in the background) nothing will happen. If you start another instance of command.com (By typing 'COMMAND') then you will have two shells running. Anything you do here will not affect the previous shell. Example: if you change your path statement in a secondary shell, when you exit all your environment variables will be lost and go back to what they where in the first shell's environment.
RD and RMDIR :
RD will Remove a Directory. Use RD followed by the name of the directory you wish to delete. You must empty the directory first or you will just get an error message from DOS. Since DOS 5.00 there has been a nifty utility called DELETREE which doesn't care if the directory has files in it.
md or mkdir :
Makes a new directory. The parent of the directory specified will be created if it does not already exist. md directory Equivalent to the Unix command mkdir.
del or erase :
Deletes one or more files. This command is used to delete a particular or more files. Syntax: del filenameerase filename Options *.* All files in current folder*.* /s all files in current folder and sub folders, Equivalent to the Unix command rm. Equivalent in RT-11/RSX-11/OpenVMS operating systems line is delete command which can be contracted to del. | |
Views: 882 | Rating: 5.0/1 |
Total comments: 0 | |