Saturday, December 1, 2007

Basic Commands in MS-DOS and Unix


MS-DOS and command line overview
Below is a listing of each of the MS-DOS commands currently listed on Computer Hope and a brief explanation of what each of the commands do. The below commands are all MS-DOS commands, which means not all the below commands will work in your version of MS-DOS and/or Windows command line. Clicking on the command will open the help page for that command with full details about it.
COMMAND
DESCRIPTION
ANSI.SYS
Defines functions that change display graphics, control cursor movement, and reassign keys.
APPEND
Causes MS-DOS to look in other directories when editing a file or running a command.
ARP
Displays, adds, and removes arp information from network devices.
ASSIGN
Assign a drive letter to an alternate letter.
ASSOC
View the file associations.
AT
Schedule a time to execute commands or programs.
ATMADM
Lists connections and addresses seen by Windows ATM call manager.
ATTRIB
Display and change file attributes.
BATCH
Recovery console command that executes a series of commands in a file.
BOOTCFG
Recovery console command that allows a user to view, modify, and rebuild the boot.ini
BREAK
Enable / disable CTRL + C feature.
CACLS
View and modify file ACL's.
CALL
Calls a batch file from another batch file.
CD
Changes directories.
CHCP
Supplement the International keyboard and character set information.
CHDIR
Changes directories.
CHKDSK
Check the hard disk drive running FAT for errors.
CHKNTFS
Check the hard disk drive running NTFS for errors.
CHOICE
Specify a listing of multiple options within a batch file.
CLS
Clears the screen.
CMD
Opens the command interpreter.
COLOR
Easily change the foreground and background color of the MS-DOS window.
COMMAND
Opens the command interpreter.
COMP
Compares files.
COMPACT
Compresses and uncompress files.
CONTROL
Open Control Panel icons from the MS-DOS prompt.
CONVERT
Convert FAT to NTFS.
COPY
Copy one or more files to an alternate location.
CTTY
Change the computers input/output devices.
DATE
View or change the systems date.
DEBUG
Debug utility to create assembly programs to modify hardware settings.
DEFRAG
Re-arrange the hard disk drive to help with loading programs.
DEL
Deletes one or more files.
DELETE
Recovery console command that deletes a file.
DELTREE
Deletes one or more files and/or directories.
DIR
List the contents of one or more directory.
DISABLE
Recovery console command that disables Windows system services or drivers.
DISKCOMP
Compare a disk with another disk.
DISKCOPY
Copy the contents of one disk and place them on another disk.
DOSKEY
Command to view and execute commands that have been run in the past.
DOSSHELL
A GUI to help with early MS-DOS users.
DRIVPARM
Enables overwrite of original device drivers.
ECHO
Displays messages and enables and disables echo.
EDIT
View and edit files.
EDLIN
View and edit files.
EMM386
Load extended Memory Manager.
ENABLE
Recovery console command to enable a disable service or driver.
ENDLOCAL
Stops the localization of the environment changes enabled by the setlocal command.
ERASE
Erase files from computer.
EXIT
Exit from the command interpreter.
EXPAND
Expand a Microsoft Windows file back to it's original format.
EXTRACT
Extract files from the Microsoft Windows cabinets.
FASTHELP
Displays a listing of MS-DOS commands and information about them.
FC
Compare files.
FDISK
Utility used to create partitions on the hard disk drive.
FIND
Search for text within a file.
FINDSTR
Searches for a string of text within a file.
FIXBOOT
Writes a new boot sector.
FIXMBR
Writes a new boot record to a disk drive.
FOR
Boolean used in batch files.
FORMAT
Command to erase and prepare a disk drive.
FTP
Command to connect and operate on a FTP server.
FTYPE
Displays or modifies file types used in file extension associations.
GOTO
Moves a batch file to a specific label or location.
GRAFTABL
Show extended characters in graphics mode.
HELP
Display a listing of commands and brief explanation.
IF
Allows for batch files to perform conditional processing.
IFSHLP.SYS
32-bit file manager.
IPCONFIG
Network command to view network adapter settings and assigned values.
KEYB
Change layout of keyboard.
LABEL
Change the label of a disk drive.
LH
Load a device driver in to high memory.
LISTSVC
Recovery console command that displays the services and drivers.
LOADFIX
Load a program above the first 64k.
LOADHIGH
Load a device driver in to high memory.
LOCK
Lock the hard disk drive.
LOGON
Recovery console command to list installations and enable administrator login.
MAP
Displays the device name of a drive.
MD
Command to create a new directory.
MEM
Display memory on system.
MKDIR
Command to create a new directory.
MODE
Modify the port or display settings.
MORE
Display one page at a time.
MOVE
Move one or more files from one directory to another directory.
MSAV
Early Microsoft Virus scanner.
MSD
Diagnostics utility.
MSCDEX
Utility used to load and provide access to the CD-ROM.
NBTSTAT
Displays protocol statistics and current TCP/IP connections using NBT
NET
Update, fix, or view the network or network settings
NETSH
Configure dynamic and static network information from MS-DOS.
NETSTAT
Display the TCP/IP network protocol statistics and information.
NLSFUNC
Load country specific information.
NSLOOKUP
Look up an IP address of a domain or host on a network.
PATH
View and modify the computers path location.
PATHPING
View and locate locations of network latency.
PAUSE
Command used in batch files to stop the processing of a command.
PING
Test / send information to another network computer or network device.
POPD
Changes to the directory or network path stored by the pushd command.
POWER
Conserve power with computer portables.
PRINT
Prints data to a printer port.
PROMPT
View and change the MS-DOS prompt.
PUSHD
Stores a directory or network path in memory so it can be returned to at any time.
QBASIC
Open the QBasic.
RD
Removes an empty directory.
REN
Renames a file or directory.
RENAME
Renames a file or directory.
RMDIR
Removes an empty directory.
ROUTE
View and configure windows network route tables.
RUNAS
Enables a user to execute a program on another computer.
SCANDISK
Run the scandisk utility.
SCANREG
Scan registry and recover registry from errors.
SET
Change one variable or string to another.
SETLOCAL
Enables local environments to be changed without affecting anything else.
SETVER
Change MS-DOS version to trick older MS-DOS programs.
SHARE
Installs support for file sharing and locking capabilities.
SHIFT
Changes the position of replaceable parameters in a batch program.
SHUTDOWN
Shutdown the computer from the MS-DOS prompt.
SMARTDRV
Create a disk cache in conventional memory or extended memory.
SORT
Sorts the input and displays the output to the screen.
START
Start a separate window in Windows from the MS-DOS prompt.
SUBST
Substitute a folder on your computer for another drive letter.
SWITCHES
Remove add functions from MS-DOS.
SYS
Transfer system files to disk drive.
TELNET
Telnet to another computer / device from the prompt.
TIME
View or modify the system time.
TITLE
Change the title of their MS-DOS window.
TRACERT
Visually view a network packets route across a network.
TREE
View a visual tree of the hard disk drive.
TYPE
Display the contents of a file.
UNDELETE
Undelete a file that has been deleted.
UNFORMAT
Unformat a hard disk drive.
UNLOCK
Unlock a disk drive.
VER
Display the version information.
VERIFY
Enables or disables the feature to determine if files have been written properly.
VOL
Displays the volume information about the designated drive.
XCOPY
Copy multiple files, directories, and/or drives from one location to another.

Unix, Linux and variants

Quick links
Unix ABCsLinux ABCsDOS vs. UnixUnix commandsUnix Top 10 commandsUnix ShortcutsLinux variantsUnix variantsUnix / Linux HistoryUnix / Linux tipsUnix / Linux linksLinux / Unix newsLinux Q&A
Unix ABCs
Unix, which is not an acronym, was developed by some of the members of the Multics team at the bell labs starting in the late 1960's by many of the same people who helped create the C programming language. The Unix today, however, is not just the work of a couple of programmers. Many other organizations, institutes and various other individuals contributed significant additions to the system we now know today.
See additional Unix information and variants and information on the Unix variants page.
Linux ABCs
Developed by Linus Torvalds and further elaborated by a number of developers throughout the world, Linux (lee'nuhks/ or /li'nuks/,_not_/li:'nuhks) is a freely available multitasking and multiuser operating system. From the outset, Linux was placed under General Public License (GPL). The system can be distributed, used and expanded free of charge. In this way, developers have access to all the source codes, thus being able to integrate new functions easily or to find and eliminate programming bugs quickly. Thereby drivers for new adapters (SCSI controller, graphics cards, etc.) can be integrated very rapidly.
See additional Linux information and variants and information on the Linux variants page.

MS-DOS vs. Unix
If you are able to navigate through MS-DOS, you will be able to pick up on the navigation of Linux and Unix; in the below chart we have listed several of the various similarities of DOS and Unix.
MS-DOS
Unix
attrib
chmod
backup
tar
dir
ls
cls
clear
copy
cp
del
rm
deltree
rm -Rrmdir
edit
vipico
format
fdformatmountumount
move / rename
mv
type
less
cd
cdchdir
more < href="http://www.computerhope.com/unix/umore.htm">more file
md
mkdir
win
startx
Forum Posts

Linux Word Processor on USB Drive
Information about linux
How to install a boot loader.....
How to show the depth of a file by a single command?
unix sleep and date commands
redhat fedora 7 linux
single user mode
Installing ubuntu.
Learning Unix
I would like to switch to linux but.......
Forum home

Brief overview of UNIX / Linux commands
Below is a listing of each of the Unix / Linux commands currently listed on Computer Hope and a brief explanation of what each of the commands do. This is a full listing which means not all the below commands will work with your distribution and may also not work because of your privileges. Clicking on any of the commands will display additional help and information about that command.
Command
Description
a2p
Creates a Perl script from an awk script.
alias
Create a name for another command or long command string.
ac
Prints statistics about users' connect time.
ar
Maintain portable archive or library.
arch
Display the architecture of the current host.
as
An assembler.
at
Command scheduler.
awk
Awk script processing program.
basename
Deletes any specified prefix from a string.
bash
Command Bourne interpreter
bc
Calculator.
bdiff
Compare large files.
bfs
Editor for large files.
bg
Continues a program running in the background.
biff
Enable / disable incoming mail notifications.
break
Break out of while, for, foreach, or until loop.
bs
Battleship game.
bye
Alias often used for the exit command.
cal
Calendar
calendar
Display appointments and reminders.
cancel
Cancels a print job.
cat
View and/or modify a file.
cc
C compiler.
cd
Change directory.
chdir
Change directory.
checkeq
Language processors to assist in describing equations.
checknr
Check nroff and troff files for any errors.
chfn
Modify your own information or if super user or root modify another users information.
chgrp
Change a groups access to a file or directory.
chkey
Change the secure RPC key pair.
chmod
Change the permission of a file.
chown
Change the ownership of a file.
chsh
Change login shell.
cksum
Display and calculate a CRC for files.
clear
Clears screen.
cls
Alias often used to clear a screen.
cmp
Compare files.
col
Reverse line-feeds filter.
comm
Compare files and select or reject lines that are common.
compress
Compress files on a computer.
continue
Break out of while, for, foreach, or until loop.
copy
Copy files.
cp
Copy files.
cpio
Creates archived CPIO files.
crontab
Create and list files that you wish to run on a regular schedule.
csh
Execute the C shell command interpreter
csplit
Split files based on context.
ctags
Create a tag file for use with ex and vi.
cu
Calls or connects to another Unix system, terminal or non-Unix system.
cut
Cut out selected fields of each line of a file.
date
Tells you the date and time in Unix.
dc
An arbitrary precision arithmetic package.
df
Display the available disk space for each mount.
deroff
Removes nroff/troff, tbl, and eqn constructs.
diff
Displays two files and prints the lines that are different.
dircmp
Lists the different files when comparing directories.
dmesg
Print or control the kernel ring buffer.
dos2unix
Converts text files between DOS and Unix formats.
dpost
Translates files created by troff into PostScript.
du
Tells you how much space a file occupies.
echo
Displays text after echo to the terminal.
ed
Line oriented file editor.
edit
Text editor.
egrep
Search a file for a pattern using full regular expressions.
elm
Program command used to send and receive e-mail.
emacs
Text editor.
enable
Enables / Disables LP printers.
env
Displays environment variables.
eqn
Language processors to assist in describing equations.
ex
Line-editor mode of the vi text editor.
exit
Exit from a program, shell or log you out of a Unix network.
expand
Expand copies of file s.
expr
Evaluate arguments as an expression.
fc
The FC utility lists or edits and re-executes, commands previously entered to an interactive sh.
fg
Continues a stopped job by running it in the foreground
fgrep
Search a file for a fixed-character string.
file
Tells you if the object you are looking at is a file or if it is a directory.
find
Finds one or more files assuming that you know their approximate filenames.
finger
Lists information about the user.
fmt
Simple text formatters.
fold
Filter for folding lines.
for
Shell built-in functions to repeatedly execute action(s) for a selected number of times.
foreach
Shell built-in functions to repeatedly execute action(s) for a selected number of times.
fromdos
Converts text files between DOS and Unix formats.
fsck
Check and repair a Linux file system.
ftp
Enables ftp access to another terminal.
getfacl
Display discretionary file information.
gprof
The gprof utility produces an execution profile of a program.
grep
Finds text within a file.
groupadd
Creates a new group account.
groupdel
Enables a super user or root to remove a group.
groupmod
Enables a super user or root to modify a group.
gunzip
Expand compressed files.
gview
A programmers text editor.
gvim
A programmers text editor.
gzip
Compress files.
halt
Stop the computer.
hash
Remove internal hash table.
hashstat
Display the hash stats.
head
Displays the first ten lines of a file, unless otherwise stated.
help
If computer has online help documentation installed this command will display it.
history
Display the history of commands typed.
hostname
Set or print name of current host system.
id
Shows you the numeric user and group ID on BSD.
ifconfig
Sets up network interfaces.
isalist
Display the native instruction sets executable on this platform.
jobs
List the jobs currently running in the background.
join
Joins command forms together.
keylogin
Decrypt the user's secret key.
kill
Cancels a job.
ksh
Korn shell command interpreter.
ld
Link-editor for object files.
ldd
List dynamic dependencies of executable files or shared objects.
less
Opposite of the more command.
lex
Generate programs for lexical tasks.
link
Calls the link function to create a link to a file.
ln
Creates a link to a file.
lo
Allows you to exit from a program, shell or log you out of a Unix network.
locate
List files in databases that match a pattern.
login
Signs into a new system.
logname
Returns users login name.
logout
Logs out of a system.
lp
Prints a file on System V systems.
lpadmin
Configure the LP print service.
lpc
Line printer control program.
lpq
Lists the status of all the available printers.
lpr
Submits print requests.
lprm
Removes print requests from the print queue.
lpstat
Lists status of the LP print services.
ls
Lists the contents of a directory.
mach
Display the processor type of the current host.
mail
One of the ways that allows you to read/send E-Mail.
mailcompat
Provide SunOS 4.x compatibility for the Solaris mailbox format.
mailx
Mail interactive message processing system.
make
Executes a list of shell commands associated with each target.
man
Display a manual of a command.
mesg
Control if non-root users can send text messages to you.
mkdir
Create a directory.
mkfs
Build a Linux file system, usually a hard disk partition.
more
Displays text one screen at a time.
mount
Disconnects a file systems and remote resources.
mt
Magnetic tape control.
mv
Renames a file or moves it from one directory to another directory.
neqn
Language processors to assist in describing equations.
netstat
Shows network status.
newalias
Install new elm aliases for user and/or system.
newform
Change the format of a text file.
newgrp
Log into a new group.
nice
Invokes a command with an altered scheduling priority.
niscat
Display NIS+ tables and objects.
nischmod
Change access rights on a NIS+ object.
nischown
Change the owner of a NIS+ object.
nischttl
Change the time to live value of a NIS+ object.
nisdefaults
Display NIS+ default values.
nisgrep
Utilities for searching NIS+ tables.
nismatch
Utilities for searching NIS+ tables.
nispasswd
Change NIS+ password information.
nistbladm
NIS+ table administration command.
nohup
Runs a command even if the session is disconnected or the user logs out.
nroff
Formats documents for display or line-printer.
nslookup
Queries a name server for a host or domain lookup.
on
Execute a command on a remote system, but with the local environment.
onintr
Shell built-in functions to respond to (hardware) signals.
optisa
Determine which variant instruction set is optimal to use.
pack
Shrinks file into a compressed file.
pagesize
Display the size of a page of memory in bytes, as returned by getpagesize.
passwd
Allows you to change your password.
paste
Merge corresponding or subsequent lines of files.
pax
Read / write and writes lists of the members of archive files and copy directory hierarchies.
pcat
Compresses file.
perl
Perl is a programming language optimized for scanning arbitrary text files, extracting information from those text files.
pg
Files perusal filters for CRTs.
pgrep
Examine the active processes on the system and reports the process IDs of the processes
pico
Simple and very easy to use text editor in the style of the Pine Composer.
ping
Sends ICMP ECHO_REQUEST packets to network hosts.
pkill
Examine the active processes on the system and reports the process IDs of the processes
poweroff
Stop the computer.
pr
Formats a file to make it look better when printed.
priocntl
Display's or set scheduling parameters of specified process(es)
printf
Write formatted output.
ps
Reports the process status.
pvs
Display the internal version information of dynamic objects within an ELF file.
pwd
Print the current working directory.
quit
Allows you to exit from a program, shell or log you out of a Unix network.
rcp
Copies files from one computer to another computer.
reboot
Stop the computer.
red
Line oriented file editor.
rehash
Recomputes the internal hash table of the contents of directories listed in the path.
remsh
Runs a command on another computer.
repeat
Shell built-in functions to repeatedly execute action(s) for a selected number of times.
rgview
A programmers text editor.
rgvim
A programmers text editor.
rlogin
Establish a remote connection from your terminal to a remote machine.
rm
Deletes a file without confirmation (by default).
rmail
One of the ways that allows you to read/send E-Mail.
rmdir
Deletes a directory.
rn
Reads newsgroups.
rpcinfo
Report RPC information.
rsh
Runs a command on another computer.
rsync
Faster, flexible replacement for rcp.
rview
A programmers text editor.
rvim
A programmers text editor.
s2p
Convert a sed script into a Perl script.
sag
Graphically displays the system activity data stored in a binary data file by a previous sar run.
sar
Displays the activity for the CPU.
script
Records everything printed on your screen.
sdiff
Compares two files, side-by-side.
sed
Allows you to use pre-recorded commands to make changes to text.
sendmail
Sends mail over the Internet.
set
Set the value of an environment variable.
setenv
Set the value of an environment variable.
setfacl
Modify the Access Control List (ACL) for a file or files.
settime
Change file access and modification time.
sftp
Secure file transfer program.
sh
Runs or processes jobs through the Bourne shell.
shred
Delete a file securely, first overwriting it to hide its contents.
shutdown
Turn off the computer immediately or at a specified time.
sleep
Waits a x amount of seconds.
slogin
OpenSSH SSH client (remote login program).
sort
Sorts the lines in a text file.
spell
Looks through a text file and reports any words that it finds in the text file that are not in the dictionary.
split
Split a file into pieces.
stat
Display file or filesystem status.
stop
Control process execution.
strip
Discard symbols from object files.
stty
Sets options for your terminal.
su
Become super user or another user.
sysinfo
Get and set system information strings.
sysklogd
Linux system logging utilities.
tabs
Set tabs on a terminal.
tail
Delivers the last part of the file.
talk
Talk with other logged in users.
tac
Concatenate and print files in reverse.
tar
Create tape archives and add or extract files.
tbl
Preprocessor for formatting tables for nroff or troff.
tcopy
Copy a magnetic tape.
tee
Read from an input and write to a standard output or file.
telnet
Uses the telnet protocol to connect to another remote computer.
time
Used to time a simple command.
timex
The timex command times a command; reports process data and system activity.
todos
Converts text files between DOS and Unix formats.
top
Display Linux tasks.
touch
Change file access and modification time.
tput
Initialize a terminal or query terminfo database.
tr
Translate characters.
traceroute
Print the route packets take to network host.
troff
Typeset or format documents.
ul
Reads the named filenames or terminal and does underlining.
umask
Get or set the file mode creation mask.
unalias
Remove an alias.
unhash
Remove internal hash table.
uname
Print name of current system.
uncompress
Uncompressed compressed files.
uniq
Report or filter out repeated lines in a file.
unmount
Crates a file systems and remote resources.
unpack
Expands a compressed file.
untar
Create tape archives and add or extract files.
until
Execute a set of actions while/until conditions are evaluated TRUE.
useradd
Create a new user or updates default new user information.
userdel
Remove a users account.
usermod
Modify a users account.
vacation
Reply to mail automatically.
vedit
Screen-oriented (visual) display editor based on ex.
vgrind
Grind nice program listings
vi
Screen-oriented (visual) display editor based on ex.
vim
A programmers text editor.
view
A programmers text editor.
wait
Await process completion.
wc
Displays a count of lines, words, and characters in a file
whereis
Locate a binary, source, and manual page files for a command.
while
Repetitively execute a set of actions while/until conditions are evaluated TRUE.
which
Locate a command.
who
Displays who is on the system.
whois
Internet user name directory service.
write
Send a message to another user.
X
Execute the X windows system.
xfd
Display all the characters in an X font.
xlsfonts
Server font list displayer for X.
xset
User preference utility for X.
xterm
Terminal emulator for X.
xrdb
X server resource database utility.
yacc
Short for yet another compiler-compiler, yacc is a compiler.
yes
Repeatedly output a line with all specified STRING(s), or 'y'.
yppasswd
Changes network password in the NIS database.
zcat
Compress files.

No comments: