Main Content

Linux commands - some basics

Archive - Originally posted on "The Horse's Mouth" - 2005-08-31 07:54:51 - Graham Ellis

Dos
command
Linux
command
Description
File basics
copycpCoPy file(s)
renmvMoVe (rename) file(s)
delrmReMove (delete) file(s)
dirlsList files / Symbols
Working on file contents
-fileWhat's in a file?
typecatDisplay file contents
| moremoredisplay file page by page
-head, tailDisplay start, end of file
-diffReport differences between files
editvi
guidelet
Edit a file
Directory handling and navigation
cd (no params)pwdPresent Working Directory
(where am I?)
cd (with params)cdChange Directory
mdmkdirMaKe DIRectory
rmdirrmdir
or rm -r
ReMove DIRectory


If you're familiar with the Windows / MSDos command line any your're moving across to / occasionally using Linux, the table above may help you.

On both DOS and Linux, you start your command line with the name of the command and then provide any parameters you need, space separated thereafter. Options to DOS commands are specified with switches of the form /x which are placed at the end of the command, whereas with Linux options are specified after the command name, and preceeded with a - sign.

Example:

dir *.*/w ... on MsDos
ls -l * ... on Linux