Find the answer to your Linux question:
Results 1 to 5 of 5
Hello again! I was practicing to copy files from one place to another and am encountering something that I do not understand, I hope you can enlighten me on this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272

    [SOLVED] Terminal Questions "cp"


    Hello again!

    I was practicing to copy files from one place to another and am encountering something that I do not understand, I hope you can enlighten me on this please.

    Code:
    [jun@localhost ~]$ mkdir copy_practice
    [jun@localhost ~]$ ls
    copy_practice  docs       Download     dwhelper  Pictures  Templates  vobcopy
    Desktop        Documents  dvdrip-data  Music     Public    Videos
    
    [jun@localhost ~]$ cp copy_practice /media/Storage\ Bin\ \(\A\)/Entertainment/Movies
    cp: omitting directory `copy_practice'
    
    [jun@localhost ~]$ cp copy_practice /media/"Storage Bin (A)"/Entertainment/Movies
    cp: omitting directory `copy_practice'
    
    [jun@localhost ~]$
    I was trying to copy "copy_practice from my "~" to "Movies" but I encounter this error message that I do not understand. Thanks!
    nujinini
    Linux User #489667

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Use -R or -r option with cp to copy recursively. It will copy all the contents in Directory and its sub-directories.
    Code:
    cp -R copy_practice /media/"Storage Bin (A)"/Entertainment/Movies
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    You can read up on the -R option as described above by Devils Casper along with other options for the cp command by going to a terminal and running:

    Code:
    man cp
    Check out LinuxCommand.org for some quick and easy command line lessons:

    LinuxCommand.org: Learn the Linux command line. Write shell scripts.
    oz

  4. #4
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Quote Originally Posted by devils casper View Post
    Use -R or -r option with cp to copy recursively. It will copy all the contents in Directory and its sub-directories.
    Code:
    cp -R copy_practice /media/"Storage Bin (A)"/Entertainment/Movies
    Done!

    Thank you!
    nujinini
    Linux User #489667

  5. #5
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Quote Originally Posted by ozar View Post
    You can read up on the -R option as described above by Devils Casper along with other options for the cp command by going to a terminal and running:

    Code:
    man cp
    Check out LinuxCommand.org for some quick and easy command line lessons:

    LinuxCommand.org: Learn the Linux command line. Write shell scripts.
    Thanks!

    Bookmarked!
    nujinini
    Linux User #489667

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •