1

I am trying to move a couple of folders from my Desktop to an external Hard Drive as Finder is not working.

When I type command mount, I get the HD listed, but when I try to use command ls or cp I get No such file or directory.

Any idea why? And what could be the remedy?

The full command I'm trying to use is cp ~/Desktop/*.jpg ~/Volumes/1 where 1 is the name of the external HD.

I'm on a Mac Pro running macOS Sierra.

  • Just to clarify, it may be good to add more detail on how you're trying to use ls and cp. At present it's not clear whether you're having problems using these on the internal drive, external drive, or both? We also don't have examples of the full syntax you're using with these commands? – Monomeeth Jan 14 at 1:41
  • Thanks for getting back to me! I tried it on internal files and it works and lists all the files I would like to find. When I try to use it on external disk it just thinks its not there. Ideally I would like to do cp ~/Desktop/*.jpg ~/Volumes/1 where 1 is the name of the external HD – Veronique Jan 14 at 1:56
  • 1
    If that's the command you're using exactly, it's the ~ that's throwing you off. Mounted drives live in /Volumes/, not ~/Volumes. The "~" is just shorthand for your home directory. – Mikey T.K. Jan 14 at 2:37
0

Based on your question it appears the problem you're having is related to the use of ~ in the external drive file path in the terminal commands you're trying to use.

Basically, the tilde symbol (~) in macOS command line usage refers to your home directory, e.g /Users/Veronique.

So, if you're trying to run a command such as: cp ~/Desktop/*.jpg ~/Volumes/1 this won't work because it's looking in the wrong place for the drive named 1. Instead, the command you need to use would be:

cp ~/Desktop/*.jpg /Volumes/1

Remember also that if your external drive name has a space in it, then you need to factor this into your command. For example, let's say you're trying to copy a file called ATM.jpg from your user Desktop folder to an external drive called Backup Drive, then your command would be:

cp ~/Desktop/ATM.jpg /Volumes/Backup\ Drive

Note the use of the backslash and space to denote the space in the external drive name.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .