Skip to main content

Why are Apache logs stored twice in domlogs?

Comments

1 comment

  • cPRex Jurassic Moderator

    Hey there!  They actually aren't stored twice on the system, but the user directories are created for statistical purposes.  If you examine the files themselves, you'll see they are a hard link because they are the same file using the same inode.  Here is an example from my personal machine showing this, and you'll see the exact same inode number in use on both:

    [root@host domlogs]# stat domain.com
    File: domain.com
      Size: 663           Blocks: 8          IO Block: 4096   regular file
    Device: 800h/2048d    Inode: 273781      Links: 2
    Access: (0640/-rw-r-----)  Uid: (    0/    root)   Gid: ( 1003/    username)
    Access: 2024-11-06 07:10:34.922789080 -0500
    Modify: 2024-11-06 10:59:36.576144364 -0500
    Change: 2024-11-06 10:59:36.576144364 -0500
     Birth: 2024-11-06 07:10:34.922789080 -0500

     

    [root@host domlogs]# stat username/domain.com
    File: folder/domain.com
      Size: 663           Blocks: 8          IO Block: 4096   regular file
    Device: 800h/2048d    Inode: 273781      Links: 2
    Access: (0640/-rw-r-----)  Uid: (    0/    root)   Gid: ( 1003/    username)
    Access: 2024-11-06 07:10:34.922789080 -0500
    Modify: 2024-11-06 10:59:36.576144364 -0500
    Change: 2024-11-06 10:59:36.576144364 -0500
     Birth: 2024-11-06 07:10:34.922789080 -0500
    0

Please sign in to leave a comment.