S5 version Table of Contents (frame/ no frame)
(20) Managing Files Previous Top Next

Files: Copying, Moving and Deleting

cp how_many not_enough
Copies the first file to the second file, does not remove the first file.
cp -r unix2 unix2copy
Copies an entire directory. Creates a new directory.
mv not_enough booty
Moves file "not_enough" to file "booty". If the destination name is on the same device as the source, this is just a rename (and so it is very fast). For diffferent devices, a mv is equivalent to a cp followed by rm
rm not_enough booty
Removes files "not_enough" and "booty". BEWARE of filenames with embedded spaces (see below).
Type in "which rm" (which tells you what command is being run, many times it will tell you the path) . Try rm -f on a file.

Previous Top Next


slide21.src  last modified Jan 31, 2011 Introduction Table of Contents
(frame/no frame)
Printable
(single file)
© Dartmouth College