cp -a /your/source/. /your/dest/
-a preserves all file atributes and symlinks
the "." at the end of /source/ includes all hidden files such as .htacess, .bash_history, .ssh etc..
The / in /dest/ makes sure the contents go into it instead of replacing /dest itself (eg. if you did not have the / at the end).........
This is useful in the case you are not properly logged in via an OpenVZ session or even a normal SSH session that you fear may go down(if the connection is broken the history is not saved).
Save your bash_history like this:
history -w ~/.bash_history
You can always change the above to another file eg /tm........
I experienced this with CPanel's Exim after an auto-update (a Google of this error produces lots of complaints with few clear solutions). In this case I'll put the solution at the top.
Run /scripts/buildeximconf to rebuild the Exim config and it should be fine after that.
mail -vs "from test" email@example.com < .bash_history
cwd=/root 4 args: send-mail -i -v firstname.lastname@example.org