mkdir backupcache
cp -rp .cache backupcache # or cp -rp \.cache backupcache does not work
nothing gets copied and directory backupcache remains empty
command linecpfiles
mkdir backupcache
cp -rp .cache backupcache # or cp -rp \.cache backupcache does not work
nothing gets copied and directory backupcache remains empty
Best Answer
Don't specify the files or Directory
Lets say you created the new folder (or are going to create one) and want to copy the files to it after the folder is created
This will copy all files/folder recursively from
/path/from/copy
in to the already existing folder created on the first line.Another approach is
tar
. For example:Using
rsync
: