I have a folder in my Desktop. I want to copy it to my server in Terminal.
I tried this unsuccessfully
[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?
Léo Léopold Hertz 준영
Léo Léopold Hertz 준영Léo Léopold Hertz 준영49.1k138138 gold badges390390 silver badges610610 bronze badges
4 Answers
From the server:
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:
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.
Léo Léopold Hertz 준영49.1k138138 gold badges390390 silver badges610610 bronze badges
NathanNathan1,52333 gold badges1616 silver badges3030 bronze badges
From your Mac (not the server):
replace
eduffyeduffymyUsername
and myServerName
appropriately.31.4k88 gold badges8383 silver badges8888 bronze badges
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
DrFalk3nDrFalk3n2,44666 gold badges2525 silver badges3434 bronze badges
cp: cannot stat
/Users/Sam/Desktop/tig-0.14.1': No such file or directory`That's the problem, alright: the file you're trying to copy is not where you thought, or not named what you typed. As suggested in comments you can try using tab completion at the prompt to make sure you have everything correct:
Note that tig-0.14.1.tar.gz is probably the actual file name, as found in the wild..
dwcdwc19.1k55 gold badges3737 silver badges5252 bronze badges
Not the answer you're looking for? Browse other questions tagged terminalcp or ask your own question.
Sometimes you save a file or folder in one place on your computer but in reorganizing your work, you decide that you want to move the item to another location. Fortunately, in Windows 7, moving files and folders around on your computer is an easy task.
To move a file or folder to another location on your computer:
- Right-click the Start menu button and choose Open Windows Explorer.The Windows Explorer window opens.
- Double-click a folder or series of folders to locate the file that you want to move.If, instead of moving the file, you actually want to create a copy of a file or folder in another location on your computer, right-click the item in Windows Explorer and choose Copy. Use Windows Explorer to navigate to the location where you want to place a copy, right-click, and choose Paste or press Ctrl+V.
- Click and drag the file to another folder in the Navigation pane on the left side of the window.If you right-click and drag, you’re offered the options of moving or copying or creating a shortcut to the item when you place it via a shortcut menu that appears.NaturalReader 14 is a beneficial tool used for convert any text file or web page into voice or audio files. It is a professional tool that help you to. Natural Reader is a Very Amazing Text-to-Speech software, which transform any. Almost 14 Languages are extensively used together with includes English,. Feb 21, 2018 - Natural Reader 14 Activation Key is a specialist text to speech system which changes any written text into spoken words. Put just, it enables you. Aug 12, 2016 - NaturalReader 14 Professional Key + Crack NaturalReader is a wonderful program that help us to convert text-into-speech, you can convert. Natural reader 14 professional crack key.
- Click the Close button in the upper-right corner of the Windows Explorer window.Windows Explorer closes.
Windows has two command line utilities to copy files/directories from command line. Copy command can be used to copy files from one folder to another folder. It can’t be used to copy a complete folder to another location on the disk. Xcopy allows us to do this. Let’s see how we can copy a directory along with all the files and sub directories to another location.
Let’s say we need to copy a directory called C:dir1sourcedir to a location named D:datadestinationdir.
Now you can run the below command to copy the complete sourcedir to D:datadestination
In the above command we can also use relative paths of the folders with respect to the current directory.
Understanding the command
Terminal Copy Directory Mac
/E – This option makes sure that empty subfolders are copied to the destination.
/I – Avoids prompting if the destination is a folder or file. Not required if you are adding a trailing ‘’ to the destination folder, like below.
/I – Avoids prompting if the destination is a folder or file. Not required if you are adding a trailing ‘’ to the destination folder, like below.
/S – This option is not required if you are using /E. /E ensures that all subfolders are also copied to the destination.
In my terminal shell, I ssh'ed into a remote server, and I
cd
to the directory I want. Now in this directory, there is a file called
table
that I want to copy to my local machine /home/me/Desktop
. How can I do this?
I tried
scp table /home/me/Desktop
but it gave an error about no such file or directory. Does anyone know how to do this?
рüффп81044 gold badges1919 silver badges3030 bronze badges
omegaomega1,26244 gold badges1313 silver badges1313 bronze badges
6 Answers
The syntax for
scp
is:If you are on the computer from which you want to send file to a remote computer:
Here the
remote
can be a FQDN or an IP address.On the other hand if you are on the computer wanting to receive file from a remote computer:
scp
can also send files between two remote hosts:So the basic syntax is:
You can read
Rui F Ribeiroman scp
to get more ideas on this.40.7k1616 gold badges9191 silver badges152152 bronze badges
heemaylheemayl37.5k33 gold badges8282 silver badges109109 bronze badges
You can use
rsync
as an alternative. It is mainly for syncing files. but you can use it for this purpose as well.to add ssh options:
--progress
and --stats
are useful for real-time display of transfer.fugitivefugitive
jasonwryan52.1k1414 gold badges137137 silver badges192192 bronze badges
user135545user135545
Dos Copy Folder
Kusalananda♦154k1818 gold badges304304 silver badges488488 bronze badges
Sadanand KenganalSadanand Kenganal
If you completely trust everyone in the network and you can connect a port of the destination machine directly, you can use netcat:
nc
.Heroes and generals change faction. Choose your fight: as Infantry, Recon, Tank Crew, Paratrooper or even a Fighter Pilot. Unlock a vast variety of weapons, vehicles, planes & ammo upgrades. Win or lose, everything you do contributes to the war. Fight in close-quarters, Infantry encounters; in larger skirmishes with vehicles or in huge land and aerial assaults.
Let's say the IP address of the destination machine is 192.168.1.123
On the destination run:
You can choose a different port, and also bind to another IP of your interfaces, 0.0.0.0 just catches on all interfaces.
On the source run:
IMHO, this is the fastest possible way to send a file from one computer to another using digital networks.
The arguments and command line options might slightly change between different versions of
nc
and tar
, but it will definitely work with recent Linux distributions.onur güngöronur güngör
On Linux, to copy a folder and its content from the user (root in this example) directory, to a folder in the local user directory, I run this command on the local machine:
scp -r [email protected]:~/folderinremoteuserdir ~/folderinlocaluserdir
Note the ~/ which I often seem to forget..
Little BrainLittle Brain
protected by Community♦Aug 12 '16 at 9:55
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?
Not the answer you're looking for? Browse other questions tagged scpcp or ask your own question.
Transferring files can be done using several methods. The most common are described below.
Data Transfer Nodes
Each cluster (except for Milgram) has a dedicated 'data transfer' node that is specially networked for high speed transfers both on and off-campus using the Yale Science Network. These transfer nodes are also the hosts of our Globus service, which enables resilient transfers of large amounts of data. From the login node of a cluster, you can ssh to the transfer node:
If you are initiating a longer running transfer and are not using Globus, you can initiate the transfer in a tmux session to protect against network interruptions.
You may also use the transfer node to transfer data from your local machine using one of the below methods. From off-cluster, the nodes are accessible at the following hostnames. Note that you still must be on-campus or the VPN to access the transfer nodes.
Cluster | Transfer Node |
---|---|
Grace | transfer-grace.hpc.yale.edu |
Farnam | transfer-farnam.hpc.yale.edu |
Ruddle | transfer-ruddle.hpc.yale.edu |
Omega | transfer-omega.hpc.yale.edu |
Milgram | use login node: milgram.hpc.yale.edu |
scp/rsync (macOS/Linux only)
Linux and Apple macOS users can use scp or rsync to transfer files to/from a cluster. You will need the hostname of the cluster transfer node (see above) to transfer files.
Note that you must have your ssh keys properly setup to use the commands outlined below. See the Cluster Access documentation for more info.
scp and sftp are both used from a Terminal window. The basic syntax of
scp
isThe “from” portion can be a filename or a directory/folder. The “to” portion will contain your netid, the hostname of the cluster transfer node (or login node for Milgram), and the destination directory/folder.
Transfer a File from Your Computer to a Cluster
Assuming the user’s netid is
ra359
, the following is run on your computer's local terminal.In this example,
myfile.txt
is copied to the directory /home/fas/admins/ra359/test:
on Grace. This example assumes that myfile.txt
is in your current directory. You may also specify the full path of myfile.txt
.Transfer a Directory to a Cluster
In this example, the contents of
mydirectory
are transferred. The -r
indicates that the copy is recursive.Transfer Files from the Cluster to Your Computer
Assuming you would like the files copied to your current directory:
Note that
.
represents your current working directory.To specify the destination, simply replace the .
with the full path:FTP Client
You can also transfer files between your local computer and a cluster using an FTP client, such as Cyberduck (OSX/Windows) or FileZilla (Linux). You will need to configure the client with your netid as the username, the cluster transfer node as the hostname and your private key as the authentication method. An example configuration of Cyberduck is shown below.
FTP on Ruddle
If you are connecting to Ruddle, which requires Multi-Factor Authentication, there are a couple additional steps.
You will need to change the Cyberduck preferences to 'Use browser connection' instead of 'open multiple connections'. This can be found under
Cyberduck > Preferences > Transfers > General
.Then once you establish your connection, you will prompted with a 'Partial authentication success' window. In the password field, type in 'push' to receive a push approval notification to the Duo app on your phone. Alternate multi-factor authentications can be used by enter the following words in the password field:
- 'push' to receive a push notification to your smart phone (requires the Duo mobile app)
- 'sms' to receive a verification passcode via text message
- 'phone' to receive a phone call
Object Storage Transfers
To move data to and from object stores such as AWS S3, or GCP cloud storage, we recommend using rclone. It is installed as a module on all of the clusters. You can use to to copy files, sync directories, etc. See http://rclone.org
To begin, configure a connection by running
You'll be prompted for a name for the connection (e.g mys3), and then details about the connection. Once you've saved that configuration, you can use that connection name to copy files:
We recommend that you protect your configurations with a password. You'll see that as an option when you run rclone config.
Large Transfers (Globus)
For larger transfers both within Yale and to external collaborators, we recommend using Globus. Globus is a file transfer service that is efficient and easy to use. It has several advantages:
![Directory Directory](/uploads/1/2/3/7/123707619/978435988.png)
- Globus can robustly and quickly transfer large files, and large collections of files
- Files can be transferred between your computer and the clusters
- Files can be transferred between Yale and other sites
- There is a simple web interface for starting and monitoring transfers, as well as a command line interface.
- You can provide access to specific files or directories to non-Yale people in a secure way.
We have set up Globus endpoints on most of the Yale clusters. Globus uses gridftp to perform transfers in parallel. Globus works a bit differently than other transfer services such as ftp or rsync. With Globus, files are always transferred between two 'endpoints'. One endpoint is always a Globus server, such as the ones we've set up on the clusters. The other endpoint can be a second server, or a Globus connect personal endpoint, which is a desktop application.
Get Started with Globus
- In a browser, go to www.globus.org.
- Click on 'Login'.
- Use the pulldown to select Yale in the list of organizations and click 'Continue'.
- If you are not already logged into CAS, you will be asked for netid and password.
- You'll see a transfer panel with dual panes. Enter an endpoint name in the left endpoint box, e.g. yale#grace.
- The file browser will show you the directories in the root directory that Globus is exporting, normally /
- Browse to any directory you can normally access, such as your home directory.
- Enter another endpoint name in the right endpoint box, and browse to your chosen directory.
- Select one or more files in either the left or right box, and click the < or > button to transfer the files in that direction.
For more information, see the official Globus Documentation.
Cluster Endpoints
We currently support endpoints for the following clusters.
Cluster | Globus Endpoint |
---|---|
Grace | yale#grace |
Farnam | yale#farnam |
Ruddle | yale#ruddle |
Omega | yale#omega |
All of these endpoints provide access to all files you normally have access to, except sequencing data on Ruddle.
Google Drive Endpoints
See our Google Drive Documentation for instructions for using Globus to transfer data to Eliapps Google Drive.
Setup an Endpoint on Your Own Computer
You can set up your own endpoint for transferring data to and from your own computer. This is called Globus Connect, and you can find instructions here. Free microsoft word download for windows 7.
Share Data with non-Yale Collaborators
Among Globus' greatest features is the ability to allow collaborators at other institutions access to specific files or directories. This is done by creating a 'shared endpoint' and setting the permissions on that endpoint. Please the official Globus documentation on sharing for detailed instructions.