Difference between revisions of "MS-DOS to Linux commands"
From Tech-Wiki
(Created page with "Category:Linux Many Linux commands typed at a shell prompt are similar to the commands you would type in MS-DOS. In fact, some commands are identical. {| class="wikitable...") |
|||
Line 9: | Line 9: | ||
|- | |- | ||
| Moves files || move || mv || mv thisfile.txt /home/thisdirectory | | Moves files || move || mv || mv thisfile.txt /home/thisdirectory | ||
+ | |- | ||
+ | | Renames a file || ren || mv || mv thisfile.txt thatfile.txt | ||
|- | |- | ||
| Lists files || dir || ls || ls | | Lists files || dir || ls || ls | ||
+ | |- | ||
+ | | Changes directories with a relative path || cd .. || cd .. || cd .. | ||
+ | |- | ||
+ | | Changes directories with a specified path (absolute path) || cd pathname || cd pathname || cd /directory/directory | ||
+ | |- | ||
+ | | Creates a directory || mkdir || mkdir || mkdir directory | ||
+ | |- | ||
+ | | Shows your location in the file system || chdir || pwd || pwd | ||
+ | |- | ||
+ | | Screens through a file || more || less || less thisfile.txt | ||
|- | |- | ||
| Clears screen || cls || clear || clear | | Clears screen || cls || clear || clear | ||
Line 17: | Line 29: | ||
|- | |- | ||
| Displays or sets date || date || date || date | | Displays or sets date || date || date || date | ||
+ | |- | ||
+ | | Displays the time || time || date || date | ||
|- | |- | ||
| Deletes files || del || rm || rm thisfile.txt | | Deletes files || del || rm || rm thisfile.txt | ||
Line 31: | Line 45: | ||
|- | |- | ||
| Displays command help || command /? || man || man command | | Displays command help || command /? || man || man command | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| Shows amount of RAM and use || mem || free || procinfo | | Shows amount of RAM and use || mem || free || procinfo | ||
|} | |} |
Revision as of 01:26, 21 March 2024
Many Linux commands typed at a shell prompt are similar to the commands you would type in MS-DOS. In fact, some commands are identical.
Command's Purpose | MS-DOS | Linux | Basic Linux Example |
---|---|---|---|
Copies files | copy | cp | cp thisfile.txt /home/thisdirectory |
Moves files | move | mv | mv thisfile.txt /home/thisdirectory |
Renames a file | ren | mv | mv thisfile.txt thatfile.txt |
Lists files | dir | ls | ls |
Changes directories with a relative path | cd .. | cd .. | cd .. |
Changes directories with a specified path (absolute path) | cd pathname | cd pathname | cd /directory/directory |
Creates a directory | mkdir | mkdir | mkdir directory |
Shows your location in the file system | chdir | pwd | pwd |
Screens through a file | more | less | less thisfile.txt |
Clears screen | cls | clear | clear |
Closes prompt window | exit | exit | exit |
Displays or sets date | date | date | date |
Displays the time | time | date | date |
Deletes files | del | rm | rm thisfile.txt |
"Echoes" output on the screen | echo | echo | echo this message |
Edits files with simple text editor | edit | pico | pico thisfile.txt |
Compares the contents of files | fc | diff | diff file1 file2 |
Finds a string of text in a file | find | grep | grep this word or phrase thisfile.txt |
Formats a floppy | format a: (if floppy's in A:) | mke2fs (or mformat) | /sbin/mke2fs /dev/fd0 (/dev/fd0 is the Linux equivalent of A:) |
Displays command help | command /? | man | man command |
Shows amount of RAM and use | mem | free | procinfo |