Results 1 to 19 of 19
  1. #1
    Member
    Join Date
    January 18th, 2005
    Posts
    51
    Hi

    My log files are over 100 MB, is it okay to delete them from my server after I save them locally on my pc?

    Also, is it normal for a site 4 months old with 500-1000 visitors/days to have log files this large?

    Grazie

    Dylan

  2. #2
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    Honiara, Solomon Islands
    Posts
    1,085
    Yes it is normal. Many hosts will allow you to enable disable logging and will zip up the files for you after a month. You can't delete your current logs while logging is enabled.

    Your opitons are to disable it and do without or delete previous months at the end of the month.

  3. #3
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    Honiara, Solomon Islands
    Posts
    1,085
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by DPG:
    Yes it is normal. Many hosts will allow you to enable disable logging and will zip up the files for you after a month. You can't delete your current logs while logging is enabled.

    Your options are to disable it and do without or delete previous months at the end of the month.<HR></BLOCKQUOTE>

  4. #4
    Member
    Join Date
    January 18th, 2005
    Posts
    51
    So I assume by your post that deleting the log files is completely safe? Whther I can or not is another issue I suppose.

    What if I am on a dedicated server? I don't remember seeing any sort of log file option in the admin area. Basically I could probably just delete the log files using ftp.

    Dylan

  5. #5
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    2,402
    Dylan,
    Backing up what DPG says, it is safe to delete those files. One thing to note is that most stats programs will cache the data, so you can often delete them with no adverse effect on stats.

    As for a dedicated server, do not use FTP. It is not a safe/secure method. You have to options...log in via SSH and delete the files from the command line. There is a program called Secure FX that can be used to log in just like an FTP client, but it uses a secure protocal. I've used it often and it works well...

    PLEASE TAKE A MOMENT AND HELP GORDON GET HIS NEW SHIRT...(He Needs....He Wants it....Grrrrrr)


    TH Media-Web Solutions For The Small Business
    Check Out The TH Media Affiliate Program

  6. #6
    ABW Veteran Student Heyder's Avatar
    Join Date
    January 18th, 2005
    Posts
    5,482
    the log files really aren't going to hurt anything unless you are running out of disc. If your disc is running that low you'd better buy a new hard drive for it.

  7. #7
    Member
    Join Date
    January 18th, 2005
    Posts
    51
    What risk is there using FTP? My data certainly is not very useful to anyone. You suggest using a 'secure' method for all file transfers or just logs?

    Heyder:
    [the log files really aren't going to hurt anything unless you are running out of disc. If your disc is running that low you'd better buy a new hard drive for it.]

    It is not a disk space that is the issue. It takes a long time to download and work with a 110 MB document. I figure I could delete them and just work on samll sized files.

    Dylan

  8. #8
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    2,402
    Dylan,
    FTP doesn't use a secure method of working with root. Info can be sniffed from the network, including passwords. While your data may not be important to them, the server itself is...It could be used for anything from spam to porn, as well as used to attack another server.

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> You suggest using a 'secure' method for all file transfers or just logs?
    <HR></BLOCKQUOTE>

    Anytime you are working with root on the server, whether its to work with files on your server, or to work with your logs.

    PLEASE TAKE A MOMENT AND HELP GORDON GET HIS NEW SHIRT...(He Needs....He Wants it....Grrrrrr)


    TH Media-Web Solutions For The Small Business
    Check Out The TH Media Affiliate Program

  9. #9
    ABW Veteran Student Heyder's Avatar
    Join Date
    January 18th, 2005
    Posts
    5,482
    Cuteftp pro has a built in shell access that looks and acts just like ftp. I love mine!

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> It is not a disk space that is the issue. It takes a long time to download and work with a 110 MB document. I figure I could delete them and just work on samll sized files.
    <HR></BLOCKQUOTE>

    Oh okay I understand

  10. #10
    Member
    Join Date
    January 18th, 2005
    Posts
    51
    I'll take a look at both:
    * Cuteftp Pro
    * Secure FX

    Thanks to all of you for your feedback.

    Regards,

    Dylan


    ps- Gordon, nice backpackers site. I am a frequent backpacker myself and your site has good content.

  11. #11
    ABW Ambassador buy_online's Avatar
    Join Date
    January 18th, 2005
    Location
    Richmond, VA
    Posts
    3,234
    Tom,

    Correct me if I am wrong on the following. If I delete the log file on say the 15th of the month, does the application write a new file to the directory with information beginning on the 16th of the month?

    In other words, deleting the file won't hurt anything, but a user might lose everything up to that date, if it is not saved on their local hard drive?

    Fred

    <font face=verdana size=1 color=43639C>You might just be a Parasite if..."You can't schedule a family reunion until after the parole board meets"</font>

  12. #12
    Full Member
    Join Date
    January 18th, 2005
    Posts
    388
    If you delete a file that's being written to and does not have a lock on it - then the app will keep writing and the OS will just keep discarding the data since the inode will no longer correspond to that file.

    So if you just delete a log file via ftp, you won't be getting any more logs until you let the http server know about it.

    Konstantin,
    www.GenericGifts.com

  13. #13
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    1,403
    Why not delete the content of that file instead the file itself?

    carneol

  14. #14
    ABW Ambassador Andy's Avatar
    Join Date
    January 18th, 2005
    Posts
    4,178
    This thread reminds me that I also need to do some clean up on my server. I know there are old Webalizer and Analog files from last year still there.

    I'm also reluctant to start deleting files that might still be needed. Is there a site on the Internet that breaks down what must be kept, and what could be deleted? Perhaps a monthly maintenance directive?

    Andy

    _______________
    "If you were born to be shot, you'll never be hung." -Unknown

  15. #15
    Member
    Join Date
    January 18th, 2005
    Posts
    51
    carneol: Why not delete the content of that file instead the file itself?

    Good question, makes sense that would be okay but can anyone confirm this?

    dylan

  16. #16
    ABW Veteran Student Heyder's Avatar
    Join Date
    January 18th, 2005
    Posts
    5,482
    I do that all the time. I'll do it right now if you don't believe me. There see! I told you so. How could you ever doubt me again?

    Seriously you can delete the content with no worries.

  17. #17
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    That's what I normally do. I'll do an:

    echo "" >/var/logs/message

    or whatever the log file is. Directing the null overwrites the file and changes the null to zero. Since the file isn't deleted, there's no inode issues.

    Joey
    Free Sheet Music
    http://www.freesheetmusic.net

  18. #18
    Newbie
    Join Date
    January 18th, 2005
    Posts
    5
    Oops, mispoke. Meant to say "changes the filesize to zero" instead of "changes the null to zero".

    Joey
    Free Sheet Music
    http://www.freesheetmusic.net

  19. #19
    Full Member
    Join Date
    January 18th, 2005
    Posts
    388
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by carneol:
    Why not delete the content of that file instead the file itself?

    carneol<HR></BLOCKQUOTE>

    Yep,
    $ truncate -s 0 FILENAME
    will do teh trick on most unix/linux systems.

    Konstantin,
    www.GenericGifts.com

  20. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Using CRON job to delete zip files
    By Convergence in forum Programming / Datafeeds / Tools
    Replies: 13
    Last Post: July 6th, 2012, 05:44 PM
  2. Help. How to delete files before a certain date in Linux?
    By womanht in forum Programming / Datafeeds / Tools
    Replies: 5
    Last Post: October 17th, 2005, 12:50 PM
  3. Newbie question about log files
    By TheWebDiva in forum Midnight Cafe'
    Replies: 1
    Last Post: April 24th, 2005, 12:33 PM
  4. Log Files for my site
    By Tristan Palser in forum Domains & Hosting
    Replies: 0
    Last Post: March 1st, 2004, 12:42 PM
  5. Google and Log Files
    By joebaracco in forum Search Engine Optimization
    Replies: 2
    Last Post: February 13th, 2003, 03:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •