| DOS Command |
Unix Command |
Action |
| DIR |
ls |
List directory
contents |
| - |
ls -l |
-long listing
format |
| - |
ls -a |
-all files (show
entries starting with .) |
| - |
df -k |
Show space
remaining on filesystem |
| TREE |
ls -R |
List directory recursively |
| CD |
cd or chdir |
Change directory |
| CD \ |
cd / |
Change to root directory |
| CD .. |
cd .. |
Change to parent directory |
| MKDIR or MD |
mkdir or md |
Make a new directory |
| RMDIR or RD |
rmdir or rd |
Remove a directory |
| CHDIR |
pwd |
Display current directory (Print working directory) |
| DEL |
rm |
Delete (remove) a file |
| DELTREE |
rm -R |
Remove all directories and files below given directory |
| COPY |
cp
-p |
Copy a file |
| XCOPY |
cp
-R |
Copy directory recursively |
| RENAME or MOVE |
mv |
Rename/move a file |
| TYPE |
cat |
Dump contents of a file to screen |
| MORE |
more or less |
Pipe output a single page at a time |
| HELP command
or command /? |
man command or command --help
|
Online documentation |
| CLS |
clear |
Clear screen |
| EXIT |
exit |
Exit a shell |
| FIND |
grep |
Look for a word in files |
| FC |
diff or mgdiff or
tkdiff |
Compare two files and show differences |
| SET |
set or env |
Show environment variables |
| SET variable |
setenv (for C shell) or export (for Korn shell) |
Set environment variables |
| ECHO text |
echo text |
Display text
on screen |
| PATH |
echo $PATH |
Display search path for executables |
| DATE or TIME |
date |
Show date/time |
| SORT |
sort |
Sort data alphabetically/numerically |
| EDIT filename.txt |
vi (or vim), pico, gnp, xedit, xemacs, dtpad |
Edit a file. vi is most likely to be found on all *ix systems. vim is an improved version of vi. pico looks most like DOS
edit. |
\
|
/
|
Directory path delimiter |
| .\ |
./ |
Current directory |
| ..\ |
../ |
Parent directory |
| BACKUP files A:\ |
tar
-cvf /dev/fd0 files
mdir, mcopy
doswrite -a file (AIX only) |
Save files to floppy |
| RESTORE A:\ files |
tar -xvf /dev/fd0 files
mdir, mcopy
dosread -a file (AIX only) |
Read files from floppy
|
| ATTRIB +h or -h |
mv file .file |
Change file to a hidden file - rename file with prefix
"." |
| ATTRIB |
chmod |
Change file properties/permissions |
| PRINT |
lpr |
Print a file |
| MEM |
free or top (Shift+M sorts by memory, Shift+P sorts by CPU
usage)
|
Show free memory on system |
| MSD |
lsdev |
Show system info |
SCANDISK CHKDSK
DEFRAG C: |
fsck
debugfs |
Check and repair hard drive file system |
| FDISK |
fdisk |
Tool to partition a hard drive |
| FORMAT |
mke2fs - hard drive
fdformat
- floppy (Unix)
mformat - floppy (MS-DOS)
|
Format drive file system |
| VER |
uname
-a |
Display Operating System version |
| pkzip |
tar, compress, zip or gzip |
Compress and uncompress files/directories. Use tar to
create
compilation of a directory before compressing. |
| HOSTNAME |
hostname |
Display hostname of computer |
| PING |
ping |
Send packets to a network host |
| TRACERT |
traceroute or tracepath
|
Show routes and router hops to given network destination |
| IPCONFIG or WINIPCFG |
ifconfig |
Display/configure network interface |
| NBTSTAT |
nmblookup (requires Samba) |
Display NetBIOS information |
nslookup
|
nslookup hostname
host hostname |
Display DNS info for host |
| ROUTE PRINT |
route
-n |
Display routing table. |
| NET SEND <node-name> <message> |
smbclient -M hostname
|
Send pop-up message to a Windows PC
|
| - |
talk |
Send message to another Unix/Linux user |
| WIN |
startx |
Start X-Windows |
|
|
|
|
|
|