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?
andrew.46
  • 38,003
  • 27
  • 156
  • 232
rtecxs
  • 183

1 Answers1

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

    cp -Ri /path/one/ /path/two/
    
Rinzwind
  • 299,756
  • 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