To celebrate this year's anniversary, I wrote a "quick reference" for our new users. This reference shows the most common FreeDOS commands, including a few important notes for new users.
You may also want to check out the free ebook we published last year: 23 Years of FreeDOS.
| What do you want to do? | How to do it on FreeDOS: |
|---|---|
| List directory contents | DIR |
| -in the directory “above” | DIR .. |
| -in a different directory | DIR C:\FDOS\BIN |
| Change the current drive | D: |
| Change the current directory | CD \FDOS\BIN |
| -“up” one directory | CD .. |
| Display the contents of a file | TYPE FILE.TXT |
| -one screen at a time | MORE FILE.TXT |
| Copy a file | COPY FILE.TXT NEW.TXT |
| Delete a file | DEL FILE.TXT |
| Copy a directory and its contents | XCOPY DIR NEWDIR |
| Delete a directory and its contents | DELTREE MYFILES |
| Create a new directory | MKDIR NEWDIR |
| Remove an empty directory | RMDIR MYFILES |
| Rename a file or directory | REN FILE.TXT FILE.OLD |
Show all lines in a file that contain “Hello” | FIND "Hello" FILE.TXT |
| -without regard for case | FIND /I "Hello" FILE.TXT |
| Clear the screen | CLS |
| Edit a text file | EDIT FILE.TXT |
| View and set the date | DATE |
| View and set the time | TIME |
| Show the usage for a program | DIR /? (for most programs) |
| Get systemwide help | HELP |
| Show the command history | HISTORY |
| Show the DOS version | VER |
A few things to remember:
- DOS commands and filenames can be upper or lowercase (
DIRis the same asdir) - Pipes (
|) are the same on DOS as on Linux - Output redirection (
>) is the same too .and..are the same on DOS as on Linux- The directory separator is
\(such asC:\orC:\FDOSorC:\FDOS\BIN) - File and directory names can only be 8.3 characters long (such as
FILENAME.EXT) - DOS uses letters for each drive (
C:is the first hard drive) - A full path is a drive letter and a directory path
Looking for more? I wrote a full FreeDOS cheat sheet for OpenSource, which you can find here: Celebrating 24 years of FreeDOS: Useful commands cheat sheet.

No comments:
Post a Comment
Note: Only a member of this blog may post a comment.