[ubuntu-uk] Help needed with ssh
jakewc2 at sky.com
Wed Jul 15 17:53:52 BST 2009
Hi, thank you for your message. So as I understand it then, if I have a
folder on the desktop called title, that is called a directory then yes?
I wanted to copy that folder to the home directory.
So what is the difference between scp and cp ~r
I really am not getting it, its very confusing. This page is showing two
different ways of copying. I am more confused now.
I need to find a night school, so I can get somebody to show me, this is
just not working.
I have never felt so frustrated in all my life as I have since trying to
learn Linux. I used to be an Intensive Care nurse, and I never found it
as hard as this. It was intense, but not as hard to work out what to do.
Sean Miller wrote:
> if you're trying to copy a directory you need to use "cp -r"
> ie. "cp -r ~/Desktop/title ~" or similar, which will create a
> directory called "title" under your home directory with the same
> contents as the one on your desktop. ("~" is Linux shorthand for your
> home directory)
> On Wed, Jul 15, 2009 at 5:01 PM, John Matthews<jakewc2 at sky.com> wrote:
>> Robert McWilliam wrote:
>>> On Wed, Jul 15, 2009 at 10:44:03AM +0100, John Matthews wrote:
>>>> This is something that I came across last night, whilst trying to upload
>>>> a file from my Dektop to my website using shell commands, or at least
>>>> trying to. Something that I found out after a while was that you need a
>>>> Terminal open for the Desktop and one for the Remote server. I just
>>>> could not get my Terminal to recognise that there was a file on my
>>>> desktp that needed to be transfered, kept saying no file found. This is
>>>> something that is really frustrating me that I couldnt get that to work,
>>>> which was why I asked about pc to pc help.
>>> I'll try and give a simple explanation of how scp works, if anything
>>> doesn't make sense or doesn't work come back to us (ideally with the
>>> command you're trying to run that doesn't work).
>>> scp copies things from one place to another, normally with the two
>>> places being on different machines.
>>> General usage is:
>>> scp <source> <destination>
>>> For the simple case <source> and <destination> will both be files
>>> (destination one that will be created), or you can give a directory
>>> for destination and the file will be placed in it with the same name
>>> as it had originally. They can be files on the same machine the
>>> command is being run on (in which case they are referred to by the
>>> path, e.g. /home/user/some.file) or on another machine (in which case
>>> you need to specify the machine, user name and the path in the form
>>> <user>@<machine>:<path>, e.g. john at example.com:/var/www/).
>>> To copy something from your Desktop on an ubuntu machine to somewhere
>>> on a webserver you'd want to run scp on the ubuntu machine, with
>>> source as the path to the file and destination specifying the web
>>> server. Something like:
>>> scp ~/Desktop/file_to.go john at example.com:/where/file/goes/
>>> To get something from the remote server:
>>> scp john at example.com:/file/to.get ~/Desktop/
>>> I think you might be confused about where you run these commands. If
>>> the webserver is running an SSH server and your local machine isn't
>>> then you should be running all the scp commands on your local
>>> machine. You then refer to things on the local machine with normal
>>> paths and stuff on the remote machine with paths with the server
>>> address prepended.
>>> Hopefully that'll help some, if anythings not clear: ask.
>> Hi, that is really handy, and looks quite simple, but when I tried it, I
>> couldnt get it to work.
>> To start off with, I just was trying to move it between my desktop to
>> the home folder.
>> akewc2 at jakewc2-laptop:~$ scp /home/jakewc2/Desktop/title
>> cp: omitting directory `/home/jakewc2/Desktop/title'
>> I saw I left the / after title so added it on the next go, still same
>> message. If it has moved it, I cant find the thing, its not where I
>> wanted it to be. This is one of those commands that I would imagine to
>> one of the most used, and once I know how to use it, will probably use
>> the terminal all the time, for things like that. Much easier that the
>> interface way.
>> This is what I mean by being shown, somewhere I am not seeing what you
>> are trying to tell me. I know it looks like, and I feel quite
>> embarrassed, but I am not really as thick as it looks, might be more
>> green as in cabbage looking. I do pick things things up.
>> ubuntu-uk at lists.ubuntu.com
More information about the ubuntu-uk