Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

hacking beggining

I’ve just started, and I’m trying to use the cp -r command to copy and paste a directory into another directory. I’ve tried using the command in Linux, but I’m not sure how to do it or whether I need to be in the main directory when I run the command...

I did this (I can't upload pictures yet):

ME:~$ ls
Descargas Escritorio LAMEJOR Musica Publico
Documentos Imagenes LAPEOR Plantilla Videos

ME: cp -r 'LAMEJOR' ~/Documentos

ME: ls
Descargas Escritorio LAMEJOR Musica Publico
Documentos Imagenes LAPEOR Plantilla Videos

ME: cd ~/Documentos

ME: ~/Documentos$ ls
Nueva carpeta LAMEJOR

But when I try it again from the Documentos directory:

~/Documentos$ cp -r 'LAMEJOR' ~/Documentos
cp: cannot stat 'LAMEJOR': No such file or directory

How do you do it?


[quote="concepto" pid='62994572' dateline='1787155504']
I’ve just started, and I’m trying to use the cp -r command to copy and paste a directory into another directory. I’ve tried using the command in Linux, but I’m not sure how to do it or whether I need to be in the main directory when I run the command...

I did this (I can't upload pictures yet):

ME:~$ ls
Descargas Escritorio LAMEJOR Musica Publico
Documentos Imagenes LAPEOR Plantilla Videos

ME: cp -r 'LAMEJOR' ~/Documentos

ME: ls
Descargas Escritorio LAMEJOR Musica Publico
Documentos Imagenes LAPEOR Plantilla Videos

ME: cd ~/Documentos

ME: ~/Documentos$ ls
Nueva carpeta LAMEJOR

But when I try it again from the Documentos directory:

~/Documentos$ cp -r 'LAMEJOR' ~/Documentos
cp: cannot stat 'LAMEJOR': No such file or directory

How do you do it?

But if I’m in the home directory and I type cp -r 'Documentos' ~/Escritorio, then it works. But if I’m in the /Plantillas directory, for example, and I type the command cp -r 'LAMEJOR' ~/Escritorio, it gives me the same error:
cp: cannot stat 'LAMEJOR': No such file or directory
command is

cp -r SOURCE_DIRECTORY DESTINATION

example

cp -r project backup/
cp -r project/ backup/project-copy/
cp -r project/* backup/

Use ChatGPT. It really helps you a lot!


Possibly Related Threads...
Thread / Author Replies Views Last Post
by conceptoAug 22, 2026 11:15 AM 5 129 Aug 22, 2026 11:15 AM
Last Post: kommer2016
by EmKosoAug 19, 2019 04:58 AM 3 334 Aug 19, 2019 04:58 AM
Last Post: EmKoso
by Sir_BreniakJul 15, 2018 10:29 AM 7 223 Jul 15, 2018 10:29 AM
Last Post: Sir_Breniak