copy-log-files.txt

#	*********  ###  3


#	To copy the log files to dates, I: 
#	cd /home/local/www/logs/     ### and then type: 
#	ls -al     ### to get a listing of the files and the dates for the files. Then to copy the files: 
#	"sudo cp -iav *log.xx 2020.01.01" with xx being the log number and then year.mo.da and then check that I have everything right before I press the enter key. Since the log files belong to nobody and nogroup, one has to use "sudo" and "cp -iav" so root can then change the owner to something else.

#	Example:

#    sudo cp -iv *log.xx year.mo.da     ### (one can use ? to replace one character, or * to replace the rest of the string for all matching files).
#    ls -al

#    sudo chown -v a0:www year.mo.da     ### the owner:group changes from root:root to a0:www
#    ls -al     ### (lists the files and shows that they are "a0 www")
#    su a0     ### (Shell to user "a0" at this point you are still at: "/home/local/www/logs/")

#    cp -iav year.mo.da ~/logs/     ### which will copy the files into the /a0/logs/ file and then,
#    cp -iav year.mo.da ~/public_html/logs/     ### which will copy the files into the /home/local/www/users/a0/logs/ file, making them live on the www. They will be under "a0/logs/". Then I usually look on my Android phone and see if they are there. One has to refresh the page to get the new files to show.
#    exit     ### this returns you back to (pi).


#	*********  ### 25

