Author Topic: Copy Files Using The Linux Command Line  (Read 1190 times)

0 Members and 1 Guest are viewing this topic.

Offline Raymond_Yvon_Herbert

  • /dev/null
  • *
  • Posts: 8
  • Cookies: -4
    • View Profile
Copy Files Using The Linux Command Line
« on: June 17, 2015, 02:58:46 am »
I started reading this book recently called The Linux Command Line by William E. Shotts Jr. He asked us to follow along and practice what we learned so far. He asked for us to make a directory in our home directory called playground. Then we changed our location to the directory playground. Then he created dir1 and dir2 inside this new directory. The next step is to copy the passwd file from the /etc directory and I don't understand how he does this. He instructs the readers to type in 'cp /etc/passwd' to accomplish the task but I get an error.
"cp missing destination file operand after '/etc/passwd'
try 'cp --help' for more information."
Frustrated, I tried another operation. A pathway of my directory goes: Home-->Downloads-->bugle
The operation I tried [While in the playground directory] was "cp ./Downloads/bugle"
The error message is as follows:
"cp: missing destination file operand after ‘./Downloads/bugle’
Try 'cp --help' for more information."

So to sum up.  I would like to have the error message explained to me and be shown the correct way to perform the operations.  Thank you.

Offline HTH

  • Official EZ Slut
  • Administrator
  • Knight
  • *
  • Posts: 395
  • Cookies: 158
  • EZ Titan
    • View Profile
Re: Copy Files Using The Linux Command Line
« Reply #1 on: June 17, 2015, 03:06:18 am »
...

"cp: missing destination file operand after ‘./Downloads/bugle’

cp sourceFile destinationFile

Done.
<ande> HTH is love, HTH is life
<TurboBorland> hth is the only person on this server I can say would successfully spitefuck peoples women

Offline Duko

  • /dev/null
  • *
  • Posts: 18
  • Cookies: 2
  • PORTUGAL <3
    • View Profile
Re: Copy Files Using The Linux Command Line
« Reply #2 on: June 17, 2015, 03:10:33 am »
"cp missing destination file operand after '/etc/passwd"

You gotta read the error message... It says its missing DESTINATION, linux wont guess where you want to copy your file man.

If you cant understand it by words, maybe a video shall help you better, since its a visual explanation.

https://www.youtube.com/watch?v=5YgIflLST4Q

Offline Raymond_Yvon_Herbert

  • /dev/null
  • *
  • Posts: 8
  • Cookies: -4
    • View Profile
Re: Copy Files Using The Linux Command Line
« Reply #3 on: June 17, 2015, 03:55:20 am »
Thank you all, especially 0pt1musPr1m3.  When reading your response it had a space period featured at the end of the command. The book actually instructed that, I just overlooked it. And you know what, I just overlooked a lot more [In your answers]. I was going to follow up with, what does the period means since a quick google search yielded no results, but I see you explained that too. Again, thank you all.

Offline kenjoe41

  • Symphorophiliac Programmer
  • Administrator
  • Baron
  • *
  • Posts: 990
  • Cookies: 224
    • View Profile
Re: Copy Files Using The Linux Command Line
« Reply #4 on: June 18, 2015, 12:44:10 pm »
Fuck with all that said and done....

RTFM or GTFO.
You know linux has man pages, right? Ok, maybe you don't know but i am sure TLCL has it written somewhere otherwise you are going to mess up on linux alot and they will be the only real help around.
If you can't explain it to a 6 year old, you don't understand it yourself.
http://upload.alpha.evilzone.org/index.php?page=img&img=GwkGGneGR7Pl222zVGmNTjerkhkYNGtBuiYXkpyNv4ScOAWQu0-Y8[<NgGw/hsq]>EvbQrOrousk[/img]