3.3.4 Copying files


Next: 3.3.5 Moving files Up: 3.3 First Steps into Previous: 3.3.3 Creating new directories

      Copying files is done with the command cp:

/home/larry/foo# cp /etc/termcap .
/home/larry/foo# cp /etc/shells .
/home/larry/foo# ls –F shells termcap

/home/larry/foo# cp shells bells

/home/larry/foo# ls –F bells shells termcap

/home/larry/foo#

The cp command copies the files listed on the command line to the file or directory given as the last argument. Notice how we use the directory « . » to refer to the current directory.


Next: 3.3.5 Moving files Up: 3.3 First Steps into Previous: 3.3.3 Creating new directories

Matt Welsh
mdw@sunsite.unc.edu

READ  The Linux Documentation Project - To Do List - Open Tasks