0

I am using Ubuntu 18. I want to copy two files in a directory from the desktop to the following directory: home/me/.local/lib/python3.6/site-packages/certifi

I executed this command:

~/Desktop$ sudo cp servers-certs/cert1.pem servers-certs/cert2.pem /home/me/.local/lib/python3.6/site-packages/certifi

I get this error:

cp: target '/.local/lib/python3.6/site-packages/certifi' is not a directory

I tried to navigate manually through the GUI. But when I enter the \home\me I can't find the .local directory.

My questions:

1) How to copy the two files from the desktop directory I specified to the other directory?

2) Why I can not see .local directory? how can I see it?

2 Answers 2

0

If the target was /home/me/.local/lib/python3.6/site-packages/certifi as you claim, cp would be complaining about it literally (if ever). It complains about /.local/lib/python3.6/site-packages/certifi instead. Note this is a different path. Two explanations:

  1. Either you put a space between /home/me and /.local/lib/… you didn't want to put (highly probable); run cp with the right target path.
  2. Or there really is a space after me, the directory name is "me " (uncommon but still technically possible); in this case you should quote the whole target:

    "/home/me /.local/lib/python3.6/site-packages/certifi"
    

Normally you cannot see .local because objects starting with . (dot) are "hidden". With ls you need -a option. Many GUI tools react to Alt+. (dot), this toggles the visibility of such objects.

1
  • In Ubuntu, it's Ctrl-h which toggles showing hidden files, both in file manager and application file dialogues.
    – AFH
    Jun 3, 2018 at 14:25
0

The error cp: target '/.local/lib/python3.6/site-packages/certifi' is not a directory means there is no directory /home/me/.local/lib/python3.6/site-packages/certifi, you need to make it, from the terminal:

cd /home/me/.local/lib/python3.6/site-packages   
mkdir certifi   

this is assuming the directory /home/me/.local/lib/python3.6/site-packages exists
then do you cp command again

The reason you don see the .local is because files and direcories starting with a dot are hidden, you can make them visible in nautilis by clicking the "View" menu and then click on the "Hidden Files" option.

1
  • I am sure there is a directory with that name. However, I navigated to it using the GUI after showing the hidden directory. Jun 3, 2018 at 14:04

You must log in to answer this question.

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