Results 1 to 8 of 8
-
20th June 2019, 12:49 PM #1
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 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:
or...
or then...
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: 5Last edited by deltree; 21st June 2019 at 02:05 AM.
-
21st June 2019, 02:08 AM #2
Last edited by deltree; 21st June 2019 at 09:04 AM.
-
21st June 2019, 07:13 PM #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:
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.
-
The Following 1 Users Say Thank You to treysis For This Useful Post:
- [ Click To Expand ]
-
deltree (22nd June 2019)
-
22nd June 2019, 02:22 AM #4
-
22nd June 2019, 10:36 PM #5
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
-
23rd June 2019, 04:17 PM #6
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:
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.
-
24th June 2019, 10:45 PM #7
-
The Following 4 Users Say Thank You to treysis For This Useful Post:
- [ Click To Expand ]
-
-
26th June 2019, 12:52 AM #8
-
The Following 1 Users Say Thank You to deltree For This Useful Post:
- [ Click To Expand ]
-
treysis (26th June 2019)
Blowfish/Meta codes for v1130...
nav4-no-3d-no-fts CD 45 BE 5A 64 47 B8 22 5A...