cp: target ... is not a directory - why does this happen?

36,140

you must use

cp LIME_SRC/soapySDR/name "CMakeLists.txt" LIME_SRC/soapySDR/mybuild

or

cp ~/LIME_SRC/soapySDR/name "CMakeLists.txt" ~/LIME_SRC/soapySDR/mybuild

instead of

cp /LIME_SRC/soapySDR/name "CMakeLists.txt" /LIME_SRC/soapySDR/mybuild

because your repertory mybuild is located in /home/alan/LIME_SRC/soapySDR/mybuild and not in /LIME_SRC/soapySDR/mybuild

Share:
36,140

Related videos on Youtube

Zanna
Author by

Zanna

Updated on September 18, 2022

Comments

  • Zanna
    Zanna almost 2 years
    alan:~/LIME_SRC/soapySDR$ mkdir mybuild
    alan:~/LIME_SRC/soapySDR$ cd mybuild
    alan:~/LIME_SRC/soapySDR/mybuild$ cp /LIME_SRC/soapySDR/name "CMakeLists.txt" /LIME_SRC/soapySDR/mybuild
    cp: target '/LIME_SRC/soapySDR/mybuild' is not a directory
    
    • muru
      muru about 6 years
      You're working in ~/LIME_SRC/soapySDR but copying to /LIME_SRC/soapySDR/....
    • Melebius
      Melebius about 6 years
      ~/LIME_SRC does not equal /LIME_SRC. What are you trying to achieve? Please elaborate.
  • Byte Commander
    Byte Commander about 6 years
    I think you should explicitly mention that ~ stands for the home directory, i.e. /home/alan probably...
  • damadam
    damadam about 6 years
    i deduct it with the information of his question, we see the user name