Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
293 views
in Technique[技术] by (71.8m points)

linux - scp gives "not a regular file"

I have a problem when using scp on Linux, it says "not a regular file". I looked at other questions/answers about that, but I can't find out what's wrong... I wrote:

scp aa@aa:/home/pictures/file.fits .

to copy file.fits from aa@aa, /home/pictures to the current directory. I also tried without using /home/, but it didn't work neither...

Do you understand what's wrong?

question from:https://stackoverflow.com/questions/29547087/scp-gives-not-a-regular-file

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I just tested this and found at least 3 situations in which scp will return not a regular file:

  1. File is actually a directory
  2. File is a named pipe (a.k.a. FIFO)
  3. File is a device file

Case #1 seems most likely. If you meant to transfer an entire directory structure with scp use the -r option to indicate recursive copy.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...