LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-07-2004, 02:15 PM   #1
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Rep: Reputation: 30
scp command


I am trying to use the scp command to copy a file from a cluster at my university to my local machine (using cygwin). I am typing:

Code:
scp  user@cluster.domain.edu: ~user/dir/dir/file.c
I keep getting the error:
scp: .: not a regular file

I thought it may be a permissions error, so I logged into my account on the cluster with ssh and checked the permissions. They were all readable.

I also tried putting a dot at the end of the command:
Code:
scp  user@cluster.domain.edu: ~user/dir/dir/file.c .
It generated the same error.

Does anyone know what this error means and it's origin?

Thanks

Last edited by zchoyt; 09-07-2004 at 02:16 PM.
 
Old 09-07-2004, 02:25 PM   #2
serz
Member
 
Registered: Apr 2003
Location: Buenos Aires, Argentina
Distribution: Slackware, Gentoo
Posts: 397

Rep: Reputation: 30
Hmm.. try this way:

scp file_to_copy user@host:destination (destinationcould be /home/user/ for example)

I think that's the way I do it.
 
Old 09-07-2004, 02:27 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
That's because you have a space where there
shouldn't be one ...

Try
Code:
scp  user@cluster.domain.edu:dir/dir/file.c .
The ~user construct is unnecessay, too, because
the user will be hooked up to his home by ssh in
the first place.

What you actually attempted (not intended) was to
copy the entire home of user to ~user/dir/dir/file.c


Cheers,
Tink
 
Old 09-07-2004, 02:34 PM   #4
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Original Poster
Rep: Reputation: 30
Thanks Tinkster. Worked like a champ. Just a syntax problem.


smell ya later
 
Old 09-07-2004, 02:36 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by zchoyt
Thanks Tinkster. Worked like a champ. Just a syntax problem.
No problem, my pleasure :)

Quote:
smell ya later
Damn, I knew I shouldn't have skipped those
last 60 showers ... :}


Cheers,
Tink
 
Old 03-05-2009, 10:36 AM   #6
Matey
Member
 
Registered: Jan 2009
Posts: 114

Rep: Reputation: 17
Thumbs up

Quote:
Originally Posted by Tinkster View Post
No problem, my pleasure


Damn, I knew I shouldn't have skipped those
last 60 showers ... :}


Cheers,
Tink
LOLL heh heh that was funny !
7 years later...

Same here, solved my problem too, so Thanks!

Last edited by Matey; 03-05-2009 at 10:39 AM.
 
Old 07-21-2010, 06:41 AM   #7
toc777
LQ Newbie
 
Registered: Jul 2010
Posts: 1

Rep: Reputation: 0
Problem fixed

8 years later...

Thanks Tinkster fixed my problem also.
 
Old 03-23-2011, 11:48 PM   #8
dka07
LQ Newbie
 
Registered: Mar 2011
Posts: 1

Rep: Reputation: 0
more years later...

Thanks Tinkster fixed my problem also.
 
Old 03-30-2014, 09:33 AM   #9
purza
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Rep: Reputation: 0
Thanks again Tinker in 2014. Anyone know why there is a " . " at the end of the line?
 
Old 04-01-2014, 05:46 PM   #10
maluhia
LQ Newbie
 
Registered: Jan 2014
Location: Central NJ
Distribution: Slackware
Posts: 10

Rep: Reputation: Disabled
The . at the end of the line refers to the current directory. In other words, you're asking scp to copy the file to the current directory, without changing the name of the file. If you wanted to copy it to a different directory, say, ~/directory, you could do:

scp user@cluster.domain.edu:dir/dir/file.c ~/directory/

Or, if you wanted to name the file differently in your current directory, you could do:

scp user@cluster.domain.edu:dir/dir/file.c new_name.c

or, equivalently:

scp user@cluster.domain.edu:dir/dir/file.c ./new_name.c
 
1 members found this post helpful.
Old 04-02-2014, 07:47 AM   #11
purza
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Rep: Reputation: 0
Thansk Maluhia!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
scp command problem srnerkar1 Linux - Networking 7 11-16-2005 08:06 AM
Include scp password in command cli_man Linux - General 1 08-05-2005 03:47 PM
command of scp Paxmaster Linux - General 4 01-06-2005 12:59 PM
error with scp command eduac Linux - Security 2 08-07-2003 04:50 PM
scp command in OpenSSH howto filsed Linux - Networking 10 05-31-2002 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration