Dos Commands VS Linux Commands
Done by Abdul Kareem.
First issue of a series on Getting some command line job done on both DOS & LINUX|
Purpose of the Command |
DOS |
Linux |
| List all the files in the working directory |
dir |
ls |
|
Copy files |
copy Ex:copy sourcefile destination path |
cp Ex:cp file.txt /home/directory |
|
Move a file to another location or directory |
move Ex: move sourcefile destination path |
mv Ex: mv file.txt /home/directory |
|
Delete a file |
del Ex:del filename |
rm Ex: rm filename |
|
Print an output message on the screen |
echo Ex: echo message |
echo Ex: echo message |
|
Clear the screen |
cls |
clear |
|
Show the memory details (RAM usage) |
mem |
free |
|
Switch to gui |
win |
Startx |
|
Rename a file or directory |
ren ,rename Ex: ren directory/path/file1 file2 |
mv mv file.txt file2 |
|
Help about help |
<command> /? help /? |
man <command> man man |
|
Displays the working directory |
chdir |
pwd |
|
Displace the system date |
date |
date |
|
Displace the system time |
time |
date |
|
editor |
edit |
vim (or other editor) |
|
To quit from the command prompt |
exit |
exit |
|
Compares two or more file and displays the difference between them |
fc |
diff |
|
Search for a string in a file |
find |
grep grep word or phrase file.txt |
|
Formats a diskette |
Format Ex: format a: (to format A:\ drive) |
mke2fs or mformat Ex: /sbin/mke2fs /dev/fd0 (/dev/fd0 is the Linux equivalent of A:) |
|
Create a directory |
mkdir or md Ex: md directory |
mkdir Ex: mkdir directory |
|
View a file |
more |
more or even less |
|
Displays or changes file attributes |
attrib |
chmod |
