Activity Stream
245,710 MEMBERS
1468 ONLINE
GPSurl On YouTube Subscribe to our Newsletter GPSurl On Twitter GPSurl On Facebook GPSurl On Google+
Linux queries

Results 1 to 8 of 8
  1.     
    #1
    deltree's Avatar

    New Linux queries

    Quote:
    Only the registered members can see the QUOTE Contents. Please Login OR Register.


    Hello Treysis... Nice to meet you!

    First of all, congratulations for your brillant job on your patch to fix the hour on TT device with GL1 chipset you did a great job!

    So... Do you can help me? I am a kind of newbie in linux, and to be honest with you I don't know how to make it by myself without a good help, from some experts like you!


    * My goal is reduce/gain some free space on my device (in automatic way), auto delete all files from the folder /MiniLog/, that have more than 30 days, because I always need checkout the log of my rutes from the last 30 days on my device! (I think thats will be very usefull for many others as well!)

    I was this use a script, but I am not sure if its will works properly or not, I need do some tests...

    This is the script:
    Code:
    Only the registered members can see the CODE Contents. Please Login OR Register.

    or...

    Linux queries

    [Login or Register to remove this advertisement]


    Code:
    Only the registered members can see the CODE Contents. Please Login OR Register.

    or then...
    Code:
    Only the registered members can see the CODE Contents. Please Login OR Register.


    Please... Show me how is the most easy way to do this, without two much complicate stuffs, if its posible ofc...

    thx in advance!
    deltree Reviewed by deltree on . Linux queries Hello Treysis... Nice to meet you! First of all, congratulations for your brillant job on your patch to fix the hour on TT device with GL1 chipset you did a great job! So... Do you can help me? I am a kind of newbie in linux, and to be honest with you I don't know how to make it by myself without a good help, from some experts like you! * My goal is reduce/gain some free space on my device (in automatic way), auto delete all files from the folder /MiniLog/, that have more than 30 Rating: 5
    Last edited by deltree; 21st June 2019 at 02:05 AM.

  2.   Advertisements

    Linux queries
  3.     
    #2
    deltree's Avatar
    for some reason, none of those tries above work's... I duno why!

    But...Works on this simulate page:
    Link URL:
    Only the registered members can see the Link URLs. Please Login OR Register.
    , it's a kind weird, I didn't know that those TT devices are so limited with their O.S!
    Last edited by deltree; 21st June 2019 at 09:04 AM.

  4.     
    #3
    Hi deltree,

    your first example should work with minor modifications. The others can't work because "date -d" seems to not work properly on TT, and "xargs" is not available.

    This is how I would write the first example:

    Code:
    Only the registered members can see the CODE Contents. Please Login OR Register.


    Of course this will delete all files except the newest 30. So if you don't use the device for a couple of days you will have files older than 30 days, but I believe this is acceptable as well.

    Now you have to decide how you want to run that script. If you start it from "ttn" it will only run after cold boot, not after standby. If you want it to run after standby you have to modify /etc/rc.resume. You can either do this inside ttsystem file, or you switch it at first boot (that's what I am doing with my WNRO patch). Or you can create a menu button to run it manually.

  5. The Following 1 Users Say Thank You to treysis For This Useful Post:
    [ Click To Expand ]

    deltree (22nd June 2019)

  6.     
    #4
    deltree's Avatar
    Quote:
    Only the registered members can see the QUOTE Contents. Please Login OR Register.


    I give a try on your suggestion... but it still without work at all!... any idea?

  7.     
    #5
    simba's Avatar
    Did you try the one that I put you ?? in the other forum
    in case this (I think) is useful for you to erase it daily;
    find /mnt/sdcard/MiniLog/*.log $(date +%Y/%m/%d) -delete
    regards

  8.     
    #6
    deltree's Avatar
    Hi Simba...

    Yes, dude but the tomtom have a very special (small) linux system and for this reason some few commands, like: Find, Tail, Date and some few others ones... Wasn't there because it's a very compact linux system.

    I already have a feedback from "Treysis":
    Treysis said:
    Quote:
    Only the registered members can see the QUOTE Contents. Please Login OR Register.

    And other point is... I need keep the last 30 days log historic... And form the way that you suggest before to me, it's will never happen!

    To do what you suggest, instead I can do this that works like a charm... But it isn't what I am looking for:
    rm /mnt/sdcard/MiniLog/*.log

    Thx for your suggestion anyway!
    Last edited by deltree; 23rd June 2019 at 08:10 PM.

  9.     
    #7
    @deltree
    I think I found the solution. I overlooked that the TT busybox shell doesn't support bash-style double-brackets ([[, ]]). You need to use "test" instead, which is more POSIX compliant:

    Code:
    Only the registered members can see the CODE Contents. Please Login OR Register.

  10. The Following 4 Users Say Thank You to treysis For This Useful Post:
    [ Click To Expand ]

    deltree (26th June 2019), Orni (25th June 2019), simba (25th June 2019), Xius27 (25th June 2019)

  11.     
    #8
    deltree's Avatar
    Quote:
    Only the registered members can see the QUOTE Contents. Please Login OR Register.


    AAAAMAZING... You are incredible, thank you, thank you and thank you so much mate!

    That works like a charm!


    @treysis...
    Link URL:
    Only the registered members can see the Link URLs. Please Login OR Register.

  12. The Following 1 Users Say Thank You to deltree For This Useful Post:
    [ Click To Expand ]

    treysis (26th June 2019)

  Suggested Articles:

Linux queries
Amount:

Enter a message for the receiver:
BE SOCIAL
Linux queries Linux queries Linux queries GPSurl On Facebook Linux queries