Breadcrumbs 
Learning >> Documentation >> File System >> Moving / copying directories
 
Recent News
We Want You!
Come and get involved! (And Christmas Party!
[ more ]
Make your own Xbox games!
Learn to make Xbox 360 games
[ more ]
New Committee
A new committee has been appointed.
[ more ]
Moving and Copying Directories
Moving and Copying Directories

You can move and copy entire directories using commands you already know!

$ mv collegeFiles collegeFiles2003

This will rename the first directory to "collegeFiles2003", again deleting the destination directory if it already exists, so be careful.

$ mv collegeFiles ../mydegree/collegeFiles2003/

The copy command syntax is a little different.

$ cp -r march_project/ march_project_backup

So what does this '-r' do? It is actually necessary if you want to copy a directory. It specifically tells the "cp" command that you want to copy all subdirectories. Lets say "march_project" had 5 directories within it, the '-r' means "recursively" copy the whole directory.

So lets learn how to delete all these files we've been creating!