How do i Empty log file on here?

 Clash Royale CLAN TAG#URR8PPP
Clash Royale CLAN TAG#URR8PPP 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


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 somewhere- echo > /pathname/filename.logwill 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 somewhere- echo > /pathname/filename.logwill 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 somewhere- echo > /pathname/filename.logwill 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 somewhere- echo > /pathname/filename.logwill 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 somewhere- echo > /pathname/filename.logwill 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