Linux copying files
I would really appreciate if anyone could tell me how to copy all files in the path /mnt/magic/docs
Into a folder like /var/www/localhost/htdocs/
I've tried using the mv command. However, everything I tried adding a '*' in the command for "current directory", the entire folder gets deleted.
mv /mnt/magic/docs/ /var/www/localhost/htdocs/ *
cp /mnt/magic/docs/* /var/ww/localhost/htdocs/.
You said copy (cp), not move (mv), and you want the wildcard on the source, not the destination.
You said copy (cp), not move (mv), and you want the wildcard on the source, not the destination.
and what is the point of the period at the end of
"cp /mnt/magic/docs/* /var/ww/localhost/htdocs/." or it is just the end of ur sentence?
If I remember correctly, the period does mean something in linux.
"cp /mnt/magic/docs/* /var/ww/localhost/htdocs/." or it is just the end of ur sentence?
If I remember correctly, the period does mean something in linux.
* is a placeholder for an arbitrary amount of arbitrary characters.
if you want to copy recursively you need to add -r.
e.g. cp -r /from /to
if you want to copy recursively you need to add -r.
e.g. cp -r /from /to
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement