cp command recursively writes directories

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I have a standard .ssh directory in my user home dir.



I have this command:



cp -rf "$HOME/.ssh" "ssh/prod"


I get this situation:



directory tree



does anyone know why it's recursively writing out subfolders in the destination?







share|improve this question






















  • did you make a symlink to "ssh/prod" inside "$HOME/.ssh", or make a symlink?
    – hhoke1
    Mar 23 at 21:10











  • What are the contents of $HOME/.ssh?
    – terdon♦
    Mar 24 at 13:59














up vote
1
down vote

favorite












I have a standard .ssh directory in my user home dir.



I have this command:



cp -rf "$HOME/.ssh" "ssh/prod"


I get this situation:



directory tree



does anyone know why it's recursively writing out subfolders in the destination?







share|improve this question






















  • did you make a symlink to "ssh/prod" inside "$HOME/.ssh", or make a symlink?
    – hhoke1
    Mar 23 at 21:10











  • What are the contents of $HOME/.ssh?
    – terdon♦
    Mar 24 at 13:59












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have a standard .ssh directory in my user home dir.



I have this command:



cp -rf "$HOME/.ssh" "ssh/prod"


I get this situation:



directory tree



does anyone know why it's recursively writing out subfolders in the destination?







share|improve this question














I have a standard .ssh directory in my user home dir.



I have this command:



cp -rf "$HOME/.ssh" "ssh/prod"


I get this situation:



directory tree



does anyone know why it's recursively writing out subfolders in the destination?









share|improve this question













share|improve this question




share|improve this question








edited Mar 24 at 13:57









terdon♦

122k28229400




122k28229400










asked Mar 23 at 20:28









Alexander Mills

1,885929




1,885929











  • did you make a symlink to "ssh/prod" inside "$HOME/.ssh", or make a symlink?
    – hhoke1
    Mar 23 at 21:10











  • What are the contents of $HOME/.ssh?
    – terdon♦
    Mar 24 at 13:59
















  • did you make a symlink to "ssh/prod" inside "$HOME/.ssh", or make a symlink?
    – hhoke1
    Mar 23 at 21:10











  • What are the contents of $HOME/.ssh?
    – terdon♦
    Mar 24 at 13:59















did you make a symlink to "ssh/prod" inside "$HOME/.ssh", or make a symlink?
– hhoke1
Mar 23 at 21:10





did you make a symlink to "ssh/prod" inside "$HOME/.ssh", or make a symlink?
– hhoke1
Mar 23 at 21:10













What are the contents of $HOME/.ssh?
– terdon♦
Mar 24 at 13:59




What are the contents of $HOME/.ssh?
– terdon♦
Mar 24 at 13:59










1 Answer
1






active

oldest

votes

















up vote
2
down vote













Well the reason it is recursively writing out subfolders is because you gave it the recursive option. '-r'



"cp -rf" is equal to "copy -recursive -force"






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433153%2fcp-command-recursively-writes-directories%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    Well the reason it is recursively writing out subfolders is because you gave it the recursive option. '-r'



    "cp -rf" is equal to "copy -recursive -force"






    share|improve this answer
























      up vote
      2
      down vote













      Well the reason it is recursively writing out subfolders is because you gave it the recursive option. '-r'



      "cp -rf" is equal to "copy -recursive -force"






      share|improve this answer






















        up vote
        2
        down vote










        up vote
        2
        down vote









        Well the reason it is recursively writing out subfolders is because you gave it the recursive option. '-r'



        "cp -rf" is equal to "copy -recursive -force"






        share|improve this answer












        Well the reason it is recursively writing out subfolders is because you gave it the recursive option. '-r'



        "cp -rf" is equal to "copy -recursive -force"







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 23 at 22:09









        Josh Pickard

        565




        565






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433153%2fcp-command-recursively-writes-directories%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?