0

scp -r /Users/Brain/Desktop/tree.png account@address:/home/directory

I successfully connect to server and enter password, but receive this message "/Users/Brain/Desktop/tree.png: No such file or directory found"

I know the file exists, it is sitting on my desktop and I can open it.

Any guidance would be much appreciated!!

Tried looking at this post but it did not help:scp files from local to remote machine error: no such file or directory

morinajc
  • 15
  • 5

1 Answers1

0

Typo? For a location like /Users, better odds are suggested for a person with the name Brian over one like Brain. After reversing the vowels, what happens with this command?

ls -l /Users/Brian/Desktop/tree.png

When presented with unexpected errors for file(s) known to exist, there's usually an issue with one pathname component. Start with the full path and drop trailing components until there's no error, eg:

ls /Users/Brain/Desktop/tree.png
ls /Users/Brain/Desktop
ls /Users/Brain
ls /Users

Some shells can trim a pathname component from the previous command with :h ; try repeating this:

!!:h

After typing the above, another possible shortcut is UP-arrow RETURN

Milag
  • 1,793
  • 2
  • 9
  • 8
  • Thank you for your help!!!! I started with your advice... and realized I was running terminal through the remote server and thus it wasn't finding my file :) – morinajc May 25 '20 at 14:46