linux - Should I put trailing slash after source and destination when copy folders -


i want copy folder:ajax(/home/thej/public_html/jc/ajax) folder: /home/thej/public_html/demo/conf/ final result /home/thej/public_html/demo/conf/ajax, know cp command should like:

cp -r /home/thej/public_html/jc/ajax /home/thej/public_html/demo/conf

my question is:

  1. should put / after ajax, ajax/?

  2. should put / after conf, conf/?

i googled online, put '/', not, confused it.

i try put trailing / on target.

if make mistake , source , target both files rather directories, adding / means i'll error; without / clobber target file.

(tab completion add trailing / anyway, it's easier add not.)

see volker siegel's answer more details.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -