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:
should put
/
afterajax
,ajax/
?should put
/
afterconf
,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
Post a Comment