Terminal User Guide
In Terminal, you can move and copy files locally or remotely using the
mv
, cp
, and scp
command-line tools.PuTTY Download - Free SSH & Telnet Client. PuTTY is a popular SSH, Telnet, and SFTP client for Windows. It is typically used for remote access to server computers over a network using the SSH protocol. This is the download page. For more information on PuTTY, see the PuTTY page. For information on SSH (Secure Shell), see the here. Next, open a Terminal window on your Mac and navigate using the cd (change directory) command to the folder containing the private key file (.pem) created during the EC2 configuration process. This is usually in the Downloads folder unless you moved the file to another folder.
Tip: It’s easier to move and copy files using the Finder. See Organize files in folders.
Move a file or folder locally
Using the built-in SSH client in Mac OS X. Mac OS X includes a command-line SSH client as part of the operating system. To use it, goto Finder, and selext Go - Utilities from the top menu. Then look for Terminal. Terminal can be used to get a local terminal window, and also supports SSH. I'm trying to copy my.profile,.rvm and.ssh folders/files to a new computer and keep getting a 'not a regular file' response. I know how to use the cp and ssh commands but I'm not sure how to use them in order to transfer files from one computer to another. Any help would be great, thanks! Documentation remote-access ssh scp SCP (Secure Copy) scp is a command for sending files over SSH. This means you can copy files between computers, say from your Raspberry Pi to your desktop or laptop, or vice-versa. First of all, you'll need to know your Raspberry Pi's IP address. Copying files to your Raspberry Pi.
- In the Terminal app on your Mac, use the
mv
command to move files or folders from one location to another on the same computer. Themv
command moves the file or folder from its old location and puts it in the new location.For example, to move a file from your Downloads folder to a Work folder in your Documents folder:% mv ~/Downloads/MyFile.txt ~/Documents/Work/MyFile.txt
You can also change the name of the file as it’s moved:% mv ~/Downloads/MyFile.txt ~/Documents/Work/NewFileName.txt
Ssh Download File To Local Machine
See the mv command man page.
Copy a file or folder locally
- In the Terminal app on your Mac, use the
cp
command to make a copy of a file.For example, to copy a folder named Expenses in your Documents folder to another volume named Data:% cp -R ~/Documents/Expenses /Volumes/Data/Expenses
The-R
flag causescp
to copy the folder and its contents. Note that the folder name does not end with a slash, which would change howcp
copies the folder.
See the cp command man page.
Copy a file or folder remotely
- In the Terminal app on your Mac, use the
scp
command to copy a file or folder to or from a remote computer.scp
uses the same underlying protocols asssh
.For example, to copy a compressed file from your home folder to another user’s home folder on a remote server:% scp -E ~/ImportantPapers.tgz [email protected]:/Users/username/Desktop/ImportantPapers.tgz
You’re prompted for the user’s password.The-E
flag preserves extended attributes, resource forks, and ACL information.The-r
flag, which isn’t used in this example, causesscp
to copy a folder and its contents.
Ssh Download File From Server To Local Machine
See the scp command man page.
See alsoOpen or quit Terminal on MacOpen new Terminal windows and tabs on MacExecute commands and run tools in Terminal on Mac