How do i Empty log file on here?

The name of the pictureThe name of the pictureThe name of the pictureClash 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.










share|improve this question

















  • 2




    Best read the log and fix whatever is filling it up
    – Panther
    Feb 27 at 2:59














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.










share|improve this question

















  • 2




    Best read the log and fix whatever is filling it up
    – Panther
    Feb 27 at 2:59












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.










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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












  • 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










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Maybe one of the following



  1. a cron job that cat /dev/null > /home/xtr3amcod3s/lptv_xtr3am_cod3s/logs/Error.log

  2. turn off logging in your application

  3. if you need the log, then use logrotate





share|improve this answer




















  • 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











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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






























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



  1. a cron job that cat /dev/null > /home/xtr3amcod3s/lptv_xtr3am_cod3s/logs/Error.log

  2. turn off logging in your application

  3. if you need the log, then use logrotate





share|improve this answer




















  • 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















up vote
1
down vote



accepted










Maybe one of the following



  1. a cron job that cat /dev/null > /home/xtr3amcod3s/lptv_xtr3am_cod3s/logs/Error.log

  2. turn off logging in your application

  3. if you need the log, then use logrotate





share|improve this answer




















  • 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













up vote
1
down vote



accepted







up vote
1
down vote



accepted






Maybe one of the following



  1. a cron job that cat /dev/null > /home/xtr3amcod3s/lptv_xtr3am_cod3s/logs/Error.log

  2. turn off logging in your application

  3. if you need the log, then use logrotate





share|improve this answer












Maybe one of the following



  1. a cron job that cat /dev/null > /home/xtr3amcod3s/lptv_xtr3am_cod3s/logs/Error.log

  2. turn off logging in your application

  3. if you need the log, then use logrotate






share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 27 at 3:12









user2616163

283




283











  • 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

















  • 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
















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


















 

draft saved


draft discarded















































 


draft saved


draft discarded














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













































































Popular posts from this blog

Which professions warranted travel in Medieval times?

How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

Trouble downloading packages list due to a “Hash sum mismatch” error