Wasn't quite sure how to word this but let's say I've used ssh
to remote into my friends MacBook (macbook_b) from my MacBook (macbook_a).
What command would I use to copy a file/directory to my MacBook (macbook_a) from my friends MacBook (macbook_b)?
Thank you.
You can also copy a specific file to a new directory using the command cp followed by the name of the file you want to copy and the name of the directory to where you want to copy the file (e.g. cp filename directory-name ). For example, you can copy grades. txt from the home directory to documents .
Highlight the files you want to copy. Press the keyboard shortcut Command + C . Move to the location you want to move the files and press Command + V to copy the files.
Holding Shift and right clicking on a file in Windows Explorer gives you an option called Copy as Path . This will copy the full path of the file to clipboard.
You can use scp (Secure Copy).
To copy FROM your machine to friends:
scp file_to_copy [email protected]:/path/to/location
In another direction:
scp [email protected]:/path/locatio/file_name file_name
If you need to copy an entire directory, you'll need to use the recursive flag, like this:
scp -r directory_to_copy [email protected]:/path/to/location
Assuming you're logged in on macbook_b:
scp file_to_copy username@macbook_a:/path/to/destination
or if you're logged in on macbook_a:
scp username@macbook_b:/path/to/file_to_copy local_destination
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