EFW Support

Support => General Support => Topic started by: zendik on Thursday 26 March 2009, 02:37:09 pm



Title: commands in shell
Post by: zendik on Thursday 26 March 2009, 02:37:09 pm
I am trying to get into the Endian machine to clear logs and such.. i can get into the command line interface but am lost from there.. Can anyone give me the code or commands to delete logs. When I enter the user name and password.. and then I was told to use /var/logs... but that did not go anywhere... can some one help me with code ??



Zoe


Title: Re: commands in shell
Post by: mrkroket on Friday 27 March 2009, 05:13:06 am
If you only want to delete or edit files,  you have an easier alternative, connect to your server using WinSCP.
It works like an FTP, you can send/receive files, delete or edit them. All in explorer-like windows.

Anyways, from console you can do:

cd /var/log  (--> To change directory)
dir               (--> To view files)
dir *.gz        (--> This shows you only the old logs. If you delete these files you'll only see )
rm -Rf /var/log/*.gz        (--> Remove all past logs. Be warned, using incorrectly rm -Rf can result in loss of data and havok!!!! )

But the above is not a long term solution.
The firewall config page: https://your-efw:10443/cgi-bin/logs_config.cgi  Should let you choose the days stored on logs.
Another option is to change the logrotate config.
nano /etc/logrotate.conf  (--> To edit the logrotate options)
The third line says: "rotate 366"
These are the days stored on logs. If you only want 1 week of stored logs, you can change it to "rotate 7".
Once you are done, press Ctrl+O to save and Ctrl+X to exit. Restart and that's all

All these things can also be done  on WinSCP.