Copying an entire directory in FreeBSD (a Unix based operating system similar to Linux) is very easy.
The following example is to copy a directory on a web server. Firstly, you must create the destination directory.
Go to the parent directory and run the following command:
This will create a directory inside the parent directory. Replace DESTINATIONDIRECTORYNAME with a directory name of your choosing.
Next, run the command to copy all of the files from the source directory into the destination directory.
Here is the command:
Replace USERNAME with the username for your server. Replace SOURCEDIRECTORYNAME with the name of the directory that you are copying. Replace DESTINATIONDIRECTORYNAME with the name of the directory that you created in the first step.
You may need to change the path to these directories depending on your server setup.
-iprv are options for the cp command:
Does Drupal development make your head explode and drive you crazy?
Why not learn from someone who has paved the way instead?
Sign up to my upcoming learning series.
I am Blair Wadman and this is where I write about Drupal, PHP, CSS etc
© Blair Wadman
2005 - 2011
Thank's for this tutorial :)
Post new comment