I have a folder in my Desktop. I want to copy it to my server in Terminal.
I tried this unsuccessfully
[~/bin]# cp -r /Users/Sam/Desktop/tig-0.14.1 ~/bin/
cp: cannot stat `/Users/Sam/Desktop/tig-0.14.1': No such file or directory
[edit]
I run the command in my server. The problem seems to be in the fact that "/Users/Sam/Desktop/tig-0.14.1" is a folder in my Mac, not in my server.
Perhaps, I cannot move the folder so simply to my server because my server do not know where my folder locates.
I have always moved the folder by GUI. Is the same possible also just in terminal?
To move a server folderOpen the Dashboard. Click STORAGE, and then click Server Folders. From the list of server folders, select the folder that you want to move.
You can also use the “Move” button to move your files if you know the path to the file location. Select the files you want to move. Right click one of the files to show the options pop up. Type the path to the folder you want to move the files to.
To use the "Move to Folder" command, select the file by clicking the file name. Click the Edit menu near the top-left of the window and select the Move to Folder option. In the new window browse to the folder you would like to move the file, then click the Move button to move the file to that folder.
From the server:
scp -r [email protected]:~/Desktop/tig-0.14.1/ ~/bin/
username is your shortname on your local mac. A.B.C.D is the IP address of your local mac as seen by the server. You will be prompted for your password.
Or if you wanted to push from your local client:
scp -r ~/Desktop/tig-0.14.1/ [email protected]:~/bin/
serveruser is the user on the server whose ~/bin you want to copy into. W.X.Y.Z is the IP address of the server as seen by your client. You will be prompted to enter serveruser's password.
scp is part of ssh. See 'man scp' (from the terminal) for more info.
From your Mac (not the server):
# scp -r ~/Desktop/tig-0.14.1 myUsername@myServerName:~/bin
replace myUsername
and myServerName
appropriately.
cp is not the correct command. Try scp instead; it has similar use and you can use it like this: (see the manual for reference)
from linux client: scp user1@host1://Users/Sam/Desktop/tig-0.14.1 ~/bin/
if you use a windows client you can use winscp to do this in "drag&drop" style
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With