Breadcrumbs 
Learning >> Documentation >> File System >> Moving / copying directories
 
Recent News
We're No 1!
We've reached the top! (Of Google!)
[ more ]
Firefox 3 Download Day
Firefox 3 has been officially released and is looking to set a world record for the most downloaded piece of software in 24hrs.
[ more ]
SSL Renewed
SSL cert has been renewed by the admin team.
[ 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!