I have a folder named rules in
/srv/www/htdocs/downloads
and I have another folder with the same name rules in here:
/srv/www/htdocs/didebansnort/core/snort/
I want to copy the folder rules in upper one to the second path
Also I want to know what is the syntax for moving?
the same that you use when you copy/move things in shell. That's why they called shell scripts:)
Copying (from -> to)
we use cp -r to copy directory (r stands for recursive) and simple cp for copying of a single file.
Moving (from -> to)
This is for nix/mac/cygwin
P.S. While in the shell you can simply type in this to get a complete manual:
If the directory
/srv/www/htdocs/didebansnort/core/snort/rules
is not empty you cannot just move/srv/www/htdocs/downloads/rules
to/srv/www/htdocs/didebansnort/core/snort
. You'll either need to delete the existing directory or devise some merging strategy. Fore example, copying overcp -r /srv/www/htdocs/downloads/rules /srv/www/htdocs/didebansnort/core/snort/rules
(as nix showed) will result in overwriting all duplicate files.