Using cp command in linux shell, how do I copy a whole directory into another directory?
        Posted  
        
            by 
                Dmitry Supranovich
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Dmitry Supranovich
        
        
        
        Published on 2012-09-30T20:53:55Z
        Indexed on 
            2012/10/01
            3:38 UTC
        
        
        Read the original article
        Hit count: 308
        
I have a directory, let's say, "work": ~/work/
This directory has some sub-folders (d1, d2...) in it and files in these sub-folders. I want to make a backup copy in the same folder, so it would be like: ~/backup/work/
However, when I use 
cp -r ./work ./backup
the folder "work" is not copied, only its subfoders (so now it's ~/backup/d1 ~/backup/d2...)
Any idea how to make it work? I'm quite new to shell, so I'm missing something :)
© Stack Overflow or respective owner