Keep log files by copying into new directory unix

cp -pR logs logs`date +$d%m%y%T`

Creates a timestamped copy directory named like “logs041015:44:42″.

This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>