Unix / OSX Terminal
|
MS-DOS
|
|
/directory1/directory2/
|
\directory1\directory2\
|
Folder in hierarchical order. e.g. /Users/yourhome/Desktoop/filename
|
cd /directory/
|
cd \directory\
|
Change directory. Move to a folder
|
mv filename1 filename2
|
ren filename1 filename2
|
Change filename: filename1 is erased and filename2 is created.
|
cp filename1 filename2
|
copy filename1 filename2
|
Copy file. The same file in another filename.
filename1 remains
|
rm filename
|
del filename |
Erase a file. Use wild card [*] to erase
multiple files.
|
cat filename
|
type filename
|
Output the contents of a file. Default:
to display, > newfile, >> add to an existing file
|
ls /directory/
|
dir \directory\
|
Output a filelist in a directory. ls
-s [file size], ls -l [all details]
|
mkdir /directory/
|
md \directory\
|
Make a new directory
|
rmdir /directory/
|
rd \directory\
|
Remove an empty directory
|
echo
|
echo
|
Output key input to display, or redirect
to a file.
|
script1 | script2
|
n.a.
|
"|" is called "pipe". Send output of
script 1 to process by script 2
|
command/script > file |
command/script > file
|
">" redirects output to a device. Default
is display. Most commonly to a file.
|
command/script >> file
|
command/script >> file
|
">>" (double ">") appends output to
an existing file.
|
ctrl + c
|
ctrl + c
|
Abort running command.
|
pwd
|
n.a.
|
Show full path of present working directory
|
su
|
n.a.
|
Request for temporal superuser privilege
. exit: return to your user privilege
|