> Source: [sk26286](https://support.checkpoint.com/results/sk/sk26286)

# sk26286 - The "scp" and "cp" commands on SecurePlatform OS

| Property | Value |
|----------|-------|
| Solution ID | sk26286 |
| Date Created | 2004-06-18 |
| Last Modified | 2019-10-10 |
| Technical Level | General |
| Products | Security Gateway, Security Management Server, Multi-Domain Security Management Server |
| Versions | R82.10, R82, R81.20, R82.20 |

## Solution

The `scp` command functions similar to the `cp` command and has the same basic format:   

`cp <source> <destination> `  
`scp <source> <destination>`   

The `scp` command is used to copy files from machine to machine and not just directory to directory.   

**Source and destination use format** :   

`user@hostname:/path/to/file`   

Example: `scp admin@george:/etc/example root@howard:/var/usr/example_moved`   

**Overview of the `cp` and `scp` commands** :   

`<source> <destination>` is comprised of any valid path and/or file name on system.   
'.' character is used to represent current working directory.   

**Note** : appropriate read/write permissions to files are required.   

**Renaming files** :   

To copy and rename a new file copy, use a different filename at end of destination path:   

`cp /etc/foo /etc/fnord`   
`scp admin@mavis:/etc/foo root@hagbard:/etc/fnord`   

**Note** : the file names are case sensitive, that means "`filename`" does NOT equal to "`FileName`".   

*** ** * ** ***

<br />

EXAMPLES:   
**Note** : for the below examples, current working directory is the `/tmp` directory:   

* `cp /home/admin/ExampleFile .`   

  copies "`ExampleFile`" from the `/home/admin` directory to the current `/tmp` directory.

<br />

* `cp ExampleFile /var/log`   

  copies "`ExampleFile`" from the `/tmp` directory to the `/var/log` directory, if the directory `/var/log` exists.   

  Note:   
  `/var/log` is a directory included on most UNIX systems by default. If the `/var` directory exists, but `/var/log` does not, then "`ExampleFile`" is copied to the `/var` directory and renamed to "`log`".

<br />

* `cp /home/admin/ExampleFile /var/ExampleFile2`   

  copies "`ExampleFile`" from the `/home/admin` directory to the `/var` directory and renames a new file in /var directory to "`ExampleFile2`".

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
