Then you can go in and look into what is going on.
cd /var
du -s *
Oh, and I hope I don't have to mention that you should not delete stuff that you didn't create yourself. You might just delete something important.
You report that /var/log/apache seems "large". I do NOT recommend simply deleting the files. Instead, if you are very very sure that no-one will ever need to see any historical archives of the errors and accesses made, you can:
cd /var/log/apache
for f in *; do > $f; done
which will truncate the files. This will make it less likely to cause problems due to non-existant files or bad permissions or required rotation signaling. If you might need these files in the future, we could talk about using logrotate to try and save them.
发布评论
评论(2)
你有root权限吗?
然后你就可以进去看看到底是怎么回事。
哦,我希望我不必提及您不应该删除不是您自己创建的内容。你可能只是删除一些重要的东西。
您报告 /var/log/apache 看起来“很大”。我不建议简单地删除这些文件。相反,如果您非常确定没有人需要查看错误和访问的任何历史档案,您可以:
这将截断文件。这将使其不太可能因不存在的文件或错误的权限或所需的轮换信号而导致问题。如果您将来可能需要这些文件,我们可以讨论使用 logrotate 来尝试保存它们。
Do you have root permissions?
Then you can go in and look into what is going on.
Oh, and I hope I don't have to mention that you should not delete stuff that you didn't create yourself. You might just delete something important.
You report that /var/log/apache seems "large". I do NOT recommend simply deleting the files. Instead, if you are very very sure that no-one will ever need to see any historical archives of the errors and accesses made, you can:
which will truncate the files. This will make it less likely to cause problems due to non-existant files or bad permissions or required rotation signaling. If you might need these files in the future, we could talk about using logrotate to try and save them.
文件系统权限需要 root 访问权限才能读取
/var
中的许多目录:ls -l /var
您只需要 root 权限即可读取所有目录:
小心运行根外壳。你可能很快就会犯很多错误,有些可能很难挽回。 :)
The filesystem permissions require root access to read many of the directories in
/var
:ls -l /var
You just need root privileges to read them all:
Be careful running with a root shell. You can make a ton of mistakes really quickly, some might be difficult to undo. :)