Purge ufw log file

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












Is there a way I can purge (empty) the ufw log file (located in /var/log/ufw.log) ?
I tried "rm" it didn't work.
I tried to stop ufw, delete the file, I couldn't do it.
Everybody talks about log level but nobody explains how to empty this file...










share|improve this question





















  • Did you use sudo? Log files of system applications are system files. Instead of removing the log file it would be better to empty it by sudo echo >/var/log/ufw.log.
    – muclux
    Apr 8 at 10:35














up vote
0
down vote

favorite












Is there a way I can purge (empty) the ufw log file (located in /var/log/ufw.log) ?
I tried "rm" it didn't work.
I tried to stop ufw, delete the file, I couldn't do it.
Everybody talks about log level but nobody explains how to empty this file...










share|improve this question





















  • Did you use sudo? Log files of system applications are system files. Instead of removing the log file it would be better to empty it by sudo echo >/var/log/ufw.log.
    – muclux
    Apr 8 at 10:35












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Is there a way I can purge (empty) the ufw log file (located in /var/log/ufw.log) ?
I tried "rm" it didn't work.
I tried to stop ufw, delete the file, I couldn't do it.
Everybody talks about log level but nobody explains how to empty this file...










share|improve this question













Is there a way I can purge (empty) the ufw log file (located in /var/log/ufw.log) ?
I tried "rm" it didn't work.
I tried to stop ufw, delete the file, I couldn't do it.
Everybody talks about log level but nobody explains how to empty this file...







log ufw purge






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 8 at 10:29









philippe

11




11











  • Did you use sudo? Log files of system applications are system files. Instead of removing the log file it would be better to empty it by sudo echo >/var/log/ufw.log.
    – muclux
    Apr 8 at 10:35
















  • Did you use sudo? Log files of system applications are system files. Instead of removing the log file it would be better to empty it by sudo echo >/var/log/ufw.log.
    – muclux
    Apr 8 at 10:35















Did you use sudo? Log files of system applications are system files. Instead of removing the log file it would be better to empty it by sudo echo >/var/log/ufw.log.
– muclux
Apr 8 at 10:35




Did you use sudo? Log files of system applications are system files. Instead of removing the log file it would be better to empty it by sudo echo >/var/log/ufw.log.
– muclux
Apr 8 at 10:35










1 Answer
1






active

oldest

votes

















up vote
0
down vote













As @muclux correctly points out, system files are usually removable only with administrator privileges; e.g. sudo. This command will remove the file:



sudo rm /var/log/ufw.log


Verify:



ls /var/log





share|improve this answer




















    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%2f1023040%2fpurge-ufw-log-file%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
    0
    down vote













    As @muclux correctly points out, system files are usually removable only with administrator privileges; e.g. sudo. This command will remove the file:



    sudo rm /var/log/ufw.log


    Verify:



    ls /var/log





    share|improve this answer
























      up vote
      0
      down vote













      As @muclux correctly points out, system files are usually removable only with administrator privileges; e.g. sudo. This command will remove the file:



      sudo rm /var/log/ufw.log


      Verify:



      ls /var/log





      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        As @muclux correctly points out, system files are usually removable only with administrator privileges; e.g. sudo. This command will remove the file:



        sudo rm /var/log/ufw.log


        Verify:



        ls /var/log





        share|improve this answer












        As @muclux correctly points out, system files are usually removable only with administrator privileges; e.g. sudo. This command will remove the file:



        sudo rm /var/log/ufw.log


        Verify:



        ls /var/log






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 8 at 12:50









        chili555

        36.5k54776




        36.5k54776



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1023040%2fpurge-ufw-log-file%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491