How can I copy a folder from the Linux command line?

sergserg

Say I'm in the / folder in a remote Linux machine I connect to over ssh.

There's a folder called testapp.

/testapp

I want to create an exact copy of this called:

/testapp-staging

Using a GUI I can just right click the folder, copy it then paste and rename it.

What command do I need to use for this?

Matt Clark

Use the cp command, but do it recursively:

cp -R /some/dir/ /some/other/dir/

If you want to print out each file copied, -Rv

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I only copy files to a remote folder on another server that don't already exist in the folder... from the command line in linux?

From Dev

How can I check the size of a folder from the Windows command line?

From Dev

How can I copy the contents of a child folder to its parent folder using command line?

From Dev

How can i copy using ssh scp from a linux folder to a windows folder?

From Dev

How can I copy a file from my machine to another machine from command line?

From Dev

How to copy a picture to clipboard from command line in linux?

From Dev

How can I determine the IP address I get from torify (tor) in shell command line (linux)?

From Dev

How can I do the `history` command and not have line numbers so I can copy multiple line commands?

From Dev

How can I open another command line application in Linux from a Java program?

From Dev

How can I send gpg encrypted mail automatically from the linux command line?

From Dev

How can I convert an OpenOffice document to PDF from the Linux command line?

From Dev

How can I add text to a file in front of a specific word from the Linux command line?

From Dev

How can I do disk surface scanning, and fix/reallocate bad sectors in Linux from the command line?

From Dev

how to delete a folder using linux command line

From Dev

How can I write to the second line of a file from the command line?

From Dev

How can I specify command line arguments using pipes in Linux?

From Dev

Copy a folder using the command line?

From Dev

How can I copy the output from a remote command into the local clipboard?

From Dev

Why can't I copy a folder from remote server to local with this command?

From Dev

How do I restart Linux (Ubuntu) from the command-line?

From Dev

How do I install NetDrive from a Linux command line (terminal)?

From Dev

How can I copy a file with a BATCH script from a folder on one drive to a folder of the same name on another drive?

From Dev

How to copy a folder to multiple folders using command line?

From Dev

How can I execute a command (like copy) for each folder in an Amazon S3 bucket?

From Java

How do I copy folder with files to another folder in Unix/Linux?

From Dev

How can I shut down a RedShift cluster from the command line?

From Dev

How can I install Qt 5.2.1 from the command line in Cygwin?

From Dev

How can I get a CSRF token from the command line?

From Dev

How can I get octal file permissions from command line?

Related Related

  1. 1

    How do I only copy files to a remote folder on another server that don't already exist in the folder... from the command line in linux?

  2. 2

    How can I check the size of a folder from the Windows command line?

  3. 3

    How can I copy the contents of a child folder to its parent folder using command line?

  4. 4

    How can i copy using ssh scp from a linux folder to a windows folder?

  5. 5

    How can I copy a file from my machine to another machine from command line?

  6. 6

    How to copy a picture to clipboard from command line in linux?

  7. 7

    How can I determine the IP address I get from torify (tor) in shell command line (linux)?

  8. 8

    How can I do the `history` command and not have line numbers so I can copy multiple line commands?

  9. 9

    How can I open another command line application in Linux from a Java program?

  10. 10

    How can I send gpg encrypted mail automatically from the linux command line?

  11. 11

    How can I convert an OpenOffice document to PDF from the Linux command line?

  12. 12

    How can I add text to a file in front of a specific word from the Linux command line?

  13. 13

    How can I do disk surface scanning, and fix/reallocate bad sectors in Linux from the command line?

  14. 14

    how to delete a folder using linux command line

  15. 15

    How can I write to the second line of a file from the command line?

  16. 16

    How can I specify command line arguments using pipes in Linux?

  17. 17

    Copy a folder using the command line?

  18. 18

    How can I copy the output from a remote command into the local clipboard?

  19. 19

    Why can't I copy a folder from remote server to local with this command?

  20. 20

    How do I restart Linux (Ubuntu) from the command-line?

  21. 21

    How do I install NetDrive from a Linux command line (terminal)?

  22. 22

    How can I copy a file with a BATCH script from a folder on one drive to a folder of the same name on another drive?

  23. 23

    How to copy a folder to multiple folders using command line?

  24. 24

    How can I execute a command (like copy) for each folder in an Amazon S3 bucket?

  25. 25

    How do I copy folder with files to another folder in Unix/Linux?

  26. 26

    How can I shut down a RedShift cluster from the command line?

  27. 27

    How can I install Qt 5.2.1 from the command line in Cygwin?

  28. 28

    How can I get a CSRF token from the command line?

  29. 29

    How can I get octal file permissions from command line?

HotTag

Archive