1

I know that we can copy things from one directory to another using the command:

cp -Ri /path/one/* /path/two/*

Here:
R = recursive
i = interactive

My questions:

  1. Does this command copy everything? (Hidden folders & files, system folder & files, etc.)
  2. If not, then what is the command? Or are there other softwares available for the job?

marked as duplicate by Sergiy Kolodyazhnyy, heemayl command-line Mar 19 '16 at 0:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1
  1. no
  2. do not specify the files:

    cp -Ri /path/one/ /path/two/
    
  • cp -Ri /path/one/ /path/two/ Does this do the job? Or do I have to necessarily type the second and third commands? – rtecxs Mar 18 '16 at 21:45
  • Be very careful with the second set of commands. It will copy /path as well. Enable dotglob in bash instead. – muru Mar 18 '16 at 21:47
  • @Rinzwind I don't think anyone here used .* . And .* expands to include .., which is where the problem lies. – muru Mar 18 '16 at 21:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.