Small Linux command reference for DOS users

Comparison between DOS commands and the equivalent Linux/Unix commands.

DOS Command UNIX Command Action
DIR ls -l (or use ls -lF)(-a all files)
(df -k Space remaining on filesystem)
List directory contents
TREE ls -R List directory recursivly
CD cd Change directory
MKDIR mkdir Make a new directory
RMDIR rmdir Remove a directory
CHDIR pwd Display directory location
DEL rm Remove a file
RMDIR /S

DELTREE

rm -R Remove all directories and files below given directory
COPY cp -p Copy a file
XCOPY cp -R Copy all file of directory recursivly
RENAME or MOVE mv Rename/move a file
TYPE cat Dump contents of a file to users screen
MORE more Pipe output a single page at a time
HELP or COMMAND/? man Online manuals
CLS clear Clear screen
EXIT exit Exit a shell
FIND grep Look for a word in files given in command line
FC diff Compare two files and show differences. Also see mgdiff and tkdiff.
SET set and env Show environment variables
ECHO text echo text Echo text to screen
SET variable setenv (for C shell) or export (for Korn shell) Set environment variables
PATH echo $PATH Display search path for executables
DATE or TIME date Show date. (also set date – DOS only)
SORT sort Sort data alphabetically/numerically
EDIT filename.txt pico, gnp, vi, xedit, xemacs,dtpad Edit a file. The Linux editor which looks most like DOS edit is probably Pico. (Not a recomendation!)
\ / 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.
See Using DOS floppies
RESTORE A:\ files tar -xvf /dev/fd0 files
mdir,
mcopy
dosread -a file (AIX only)
Read files from floppy.
See Using DOS floppies
ATTRIB +h or -h mv file .file Change file to a hidden file – rename file with prefix “.”
PRINT lpr Print a file
MEM free
top
Show free memory on system
MSD lsdev Show system info (Command borrowed from AIX)
SCANDISK
DEFRAG C:
fsck
debugfs
Check and repair hard drive file system
FDISK fdisk Tool to partition a hard drive.
FORMAT mke2fs
See: fdformat and mformat for floppies
Format drive file system.
For floppy drive use see YoLinux Tutorial Using DOS Floppies with Linux
VER uname -a Operating system version
pkzip tar and zip Compress and uncompress files/directories. Use tar to create compilation of a directory before compressing. Linux also has compress, gzip
PING ping Send packets to a network host
TRACERT traceroute Show routes and router hops to given network destination.
IPCONFIG ifconfig Display/configure network interface
NBTSTAT (Netbios info: -n, -c)
NBTSTAT -a host-name
NBTSTAT -A IP-address
nslookup host-name
host host-name
Print DNS info for host.
ROUTE PRINT route -n Print routing table.
NET SEND <node-name> <message> smbclient -M MS-Windows-host-name
talk
Send pop-up to a MS/Windows PC
Send message to another Unix/Linux user. See YoLinux tutorial
WIN startx Start X-Windows.

source: http://www.yolinux.com/TUTORIALS/unix_for_dos_users.html