Tech Kraft

Documentum, AWS, Java, Ruby on Rails, Linux, Windows, App Servers


Linux: scp command basics and to copy a directory

The scp command in linux is used to securely copy (scp – secure copy) files and folders from one linux server to another. The basic structure of the scp command is as follows:

scp source  target
scp username@source_servername_or_ip:/path/to/file_or_directory location/to/copy/file_or_folder/to

When you run the above command from the target directory, you will be prompted to type the password for the username on the source server. The username should have at least read privileges to the file_or_folder you are trying to copy.

To copy to the current directory location, you can just specify a ‘.’ as below:

scp username@source_servername_or_ip:/path/to/file_or_directory .

To copy an entire directory, use the following command:

scp -r username@source_servername_or_ip:/path/to/directory .


Leave a comment

About Me

Senior Software Engineer professional with over 16 years of success with multiple open source technologies and various Content Management platforms and solutions.

Proven technical abilities through numerous projects involving enterprise web application design and development, application installation, configuration and support, and workflow and collaboration system designs.

  • Ability to learn new technologies and platforms quickly and apply them to the task at hand.
  • Excellent analytical skills, and strong communication and collaboration abilities.
  • Technical emphasis in including but not limited to Java, Ruby on Rails, Documentum and Alfresco
    in both Linux and Windows based environments

Newsletter