Command Line
Command-Line Interface (CLI) processes commands to a computer program in the form of lines of text. The program which handles the interface is called a command-line interpreter or command-line processor. Operating systems implement a command-line interface in a shell for interactive access to operating system functions or services.
Basic Command Line inputs
- x /? provides syntax info and complete list of all parameters for x (a command, like “cd”)
- cd change directory
- cd .. move to the parent directory
- cd x move to the current\x directory
- cd z: change to the z root directory (as opposed to c:)
- copy x y copy file x to directory y (Ex: D:\games\galaga.exe C:\programs[\awesome.exe]), [] = optional
- copy file con display file contents in console
- copy con file.txt create text file in the console window, end with ctrl+z (z or F6)
- date change the date
- del delete/erase
- del x deletes all files/folders fitting x
- del . deletes all files within current directory
- del . = deletes all files within current directory
- dir display contents of current directory (Ex: dir [c:][\programs]), [] = optional
- dir *.txt list all .txt files in current directory
- dir *.? list all files with extensions one character in length in current directory
- dir /w /p . = display all contents one screen at a time
- dir display all contents one line at a time
- dir /? provides syntax info and complete list of all dir parameters
- echo send command line input to display (by default)
- echo sometext » somefile.txt append line(s) of text to any file
- echo sometext > somefile.txt overwrites file with sometext
- erase delete/erase
- exit exit the command prompt
- filename.txt opens filename.txt in current directory in Notepad (or default .txt program)
- format z: format z drive [Ex: use to format a disc or flash drive]
- mkdir x make directory x in current directory
- move x y more or rename x to y
- q escapes sequential display of contents (i.e. the more parameter)
- rd x remove/delete directory x if it’s empty
- ren x y rename file x to y
- time change the time
- type file display the contents of the file ‘file’ (displays file contents in console)
- type file display the contents one line at a time