cron question

Some of you might know that I'm wanting to learn a *nix environment. (It figures my laptop had to die after installing FreeBSD. The HD started going bad awhile back.) I learn pretty quick by looking at a command and thinking about what it does.

Anyways, I asked my host about a cron job to copy my log file to a different directory. I got a reply with the command listed below (dir names modified). Since I'm on dialup I figured I should zip the log instead.

cp -f /etc/httpd/domlogs/mysitelog.log /home/mysite/public_html

I believe that the command "cp" is copy, the "-f" switch I have no idea what its for (keep owner?), and the rest of the command is pretty obvious (source dir, then destination directory).

Would the following command zip the log and put it in my public_html directory, and leave the original intact if this command was run from a cron?

gzip /etc/httpd/domlogs/mysitelog.log /home/mysite/public_html

thanks in advance cron question

 

 

 

 

Top