Welcome, Guest. Please login or register.
Did you miss your activation email?
Saturday 09 November 2024, 07:57:59 am

Login with username, password and session length

CLICK HERE for the The official Endian Roadmap and Issue tracker
14250 Posts in 4377 Topics by 6515 Members
Latest Member: hulteends
Search:     Advanced search
+  EFW Support
|-+  Support
| |-+  General Support
| | |-+  commands in shell
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: commands in shell  (Read 15100 times)
zendik
Full Member
***
Offline Offline

Posts: 12


« 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
Logged
mrkroket
Hero Member
*****
Offline Offline

Posts: 495


« Reply #1 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.

Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Page created in 0.053 seconds with 18 queries.
Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Design by 7dana.com