Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Moving files from one Dir to another


    I have been trying to move a file, abc under Dir A to Dir B.
    And my pwd is Dir A.
    Here is the command:
    Code:
    cp  abc /B
    The error message is:
    cp: cannot create regular file `/B': Permission denied

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    704
    By using
    /B
    you are saying the the directory B is at the top level (/). Try:
    Code:
    cp path_to_A/A/abc path_to_B/B/
    or
    Code:
    cd  path_to_A/A
    cp abc path_to_B/B/

Posting Permissions

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