How do i Empty log file on here?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
got a error.log on server - linux 14.04 an would like to learn how to remove/empty log file
/home/xtr3amcod3s/lptv_xtr3am_cod3s/logs
Theres an Error.log there that gets filled up quick, is there a script to write or something i can do, example if it reaches 2 gigs - empty, by it self.
Any help would be appreciated.
server
add a comment |Â
up vote
0
down vote
favorite
got a error.log on server - linux 14.04 an would like to learn how to remove/empty log file
/home/xtr3amcod3s/lptv_xtr3am_cod3s/logs
Theres an Error.log there that gets filled up quick, is there a script to write or something i can do, example if it reaches 2 gigs - empty, by it self.
Any help would be appreciated.
server
2
Best read the log and fix whatever is filling it up
â Panther
Feb 27 at 2:59
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
got a error.log on server - linux 14.04 an would like to learn how to remove/empty log file
/home/xtr3amcod3s/lptv_xtr3am_cod3s/logs
Theres an Error.log there that gets filled up quick, is there a script to write or something i can do, example if it reaches 2 gigs - empty, by it self.
Any help would be appreciated.
server
got a error.log on server - linux 14.04 an would like to learn how to remove/empty log file
/home/xtr3amcod3s/lptv_xtr3am_cod3s/logs
Theres an Error.log there that gets filled up quick, is there a script to write or something i can do, example if it reaches 2 gigs - empty, by it self.
Any help would be appreciated.
server
server
asked Feb 27 at 2:27
![](https://lh6.googleusercontent.com/-KOpLjCTlZ64/AAAAAAAAAAI/AAAAAAAADMU/T-cJ-oPB5ss/photo.jpg?sz=32)
![](https://lh6.googleusercontent.com/-KOpLjCTlZ64/AAAAAAAAAAI/AAAAAAAADMU/T-cJ-oPB5ss/photo.jpg?sz=32)
S X
31
31
2
Best read the log and fix whatever is filling it up
â Panther
Feb 27 at 2:59
add a comment |Â
2
Best read the log and fix whatever is filling it up
â Panther
Feb 27 at 2:59
2
2
Best read the log and fix whatever is filling it up
â Panther
Feb 27 at 2:59
Best read the log and fix whatever is filling it up
â Panther
Feb 27 at 2:59
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Maybe one of the following
- a cron job that
cat /dev/null > /home/xtr3amcod3s/lptv_xtr3am_cod3s/logs/Error.log
- turn off logging in your application
- if you need the log, then use logrotate
I read somewhereecho > /pathname/filename.log
will also work.
â WinEunuuchs2Unix
Feb 27 at 3:24
That works too! My thought though is that the log file is created and enabled for a reason. With that in mind, I would ensure I configure logrotate to rotate my file when reaches 2GB, restrict the number of log files to 2 or 3, then use compress or delaycompress to save space.
â user2616163
Feb 27 at 22:00
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Maybe one of the following
- a cron job that
cat /dev/null > /home/xtr3amcod3s/lptv_xtr3am_cod3s/logs/Error.log
- turn off logging in your application
- if you need the log, then use logrotate
I read somewhereecho > /pathname/filename.log
will also work.
â WinEunuuchs2Unix
Feb 27 at 3:24
That works too! My thought though is that the log file is created and enabled for a reason. With that in mind, I would ensure I configure logrotate to rotate my file when reaches 2GB, restrict the number of log files to 2 or 3, then use compress or delaycompress to save space.
â user2616163
Feb 27 at 22:00
add a comment |Â
up vote
1
down vote
accepted
Maybe one of the following
- a cron job that
cat /dev/null > /home/xtr3amcod3s/lptv_xtr3am_cod3s/logs/Error.log
- turn off logging in your application
- if you need the log, then use logrotate
I read somewhereecho > /pathname/filename.log
will also work.
â WinEunuuchs2Unix
Feb 27 at 3:24
That works too! My thought though is that the log file is created and enabled for a reason. With that in mind, I would ensure I configure logrotate to rotate my file when reaches 2GB, restrict the number of log files to 2 or 3, then use compress or delaycompress to save space.
â user2616163
Feb 27 at 22:00
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Maybe one of the following
- a cron job that
cat /dev/null > /home/xtr3amcod3s/lptv_xtr3am_cod3s/logs/Error.log
- turn off logging in your application
- if you need the log, then use logrotate
Maybe one of the following
- a cron job that
cat /dev/null > /home/xtr3amcod3s/lptv_xtr3am_cod3s/logs/Error.log
- turn off logging in your application
- if you need the log, then use logrotate
answered Feb 27 at 3:12
user2616163
283
283
I read somewhereecho > /pathname/filename.log
will also work.
â WinEunuuchs2Unix
Feb 27 at 3:24
That works too! My thought though is that the log file is created and enabled for a reason. With that in mind, I would ensure I configure logrotate to rotate my file when reaches 2GB, restrict the number of log files to 2 or 3, then use compress or delaycompress to save space.
â user2616163
Feb 27 at 22:00
add a comment |Â
I read somewhereecho > /pathname/filename.log
will also work.
â WinEunuuchs2Unix
Feb 27 at 3:24
That works too! My thought though is that the log file is created and enabled for a reason. With that in mind, I would ensure I configure logrotate to rotate my file when reaches 2GB, restrict the number of log files to 2 or 3, then use compress or delaycompress to save space.
â user2616163
Feb 27 at 22:00
I read somewhere
echo > /pathname/filename.log
will also work.â WinEunuuchs2Unix
Feb 27 at 3:24
I read somewhere
echo > /pathname/filename.log
will also work.â WinEunuuchs2Unix
Feb 27 at 3:24
That works too! My thought though is that the log file is created and enabled for a reason. With that in mind, I would ensure I configure logrotate to rotate my file when reaches 2GB, restrict the number of log files to 2 or 3, then use compress or delaycompress to save space.
â user2616163
Feb 27 at 22:00
That works too! My thought though is that the log file is created and enabled for a reason. With that in mind, I would ensure I configure logrotate to rotate my file when reaches 2GB, restrict the number of log files to 2 or 3, then use compress or delaycompress to save space.
â user2616163
Feb 27 at 22:00
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1010138%2fhow-do-i-empty-log-file-on-here%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
Best read the log and fix whatever is filling it up
â Panther
Feb 27 at 2:59