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 02-04-2016, 11:31 PM   #1
cilbuper
Member
 
Registered: Mar 2008
Posts: 141

Rep: Reputation: 0
SCP give "not a regular file" when I use it


I'm trying to copy a text doc to a web server and no matter what I try I am getting "not a regular file"

I have tried probably 20 different combos of source & destination locations, changed file name, changed file permissions & even tried different files. I have tried a plain text fil and a script with a .pl extension. the thing is I can copy any of them with WinSCP...

I have tried
User@Computer:~$ scp username@domain.com:/the/path/to/my/folder/ ./transfile.txt
User@Computer:~$ scp username@domain.com:/the/path/to/my/folder/ transfile.txt
The above I was always in the folder with the file. I haver added the full file address as well. I have tried as root and as a super user command. Nothing works for some reason, but my windows machine with WinSCP will send it (hosted from the linux machine that won't send the file, so it isn't a different file)

Any ideas how to fix this or what it might be? I'be had this happen before but had to move on to other things. BTW I'm running Ubuntu 14.04
 
Old 02-05-2016, 05:06 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,597

Rep: Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690
RTFM, but get the cliff notes versions also.

You are using the command improperly.
The command as you provided it (NOT enclosed in code tags, as it should be) does attempt to copy the folder
Code:
 /the/path/to/my/folder/
on server
Code:
 domain.com
into the file
Code:
./transfile.txt
and scp is (quite properly) telling you it cannot do that because you cannot copy a folder to a file.

Did you read the man page on scp?

I suspect it is because you have mixed up your source and destination in the command. Could you tell me if that may be correct?
 
Old 02-05-2016, 11:03 AM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
The syntax for scp is just like with mv, cp, rsync, etc.

Code:
scp [flags] source destination
If you want to copy transfile.txt to domain.com, then you have the source and destination backwards. As wpeckham said, the error is because your command, as written, is trying to copy a directory into a file, which is nonsense.
 
  


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
FreeRadius 1.1.7 regular expression in "users" file goestin Linux - Software 1 03-08-2012 08:43 AM
[SOLVED] rsync - how to suppress "skipping non-regular file" messages arashi256 Linux - Newbie 1 05-11-2011 09:02 AM
Why we should give "core" parameter in yum config file ram_rajavarapu Linux - Enterprise 2 08-16-2010 12:49 PM
New and upgraded packages give "No such file or directory" error. Lickwid Arch 3 09-03-2008 12:52 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM

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

All times are GMT -5. The time now is 03:51 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