[Gambas-user] cleaning gambas.1000 dir

Admin admin at allunix.ru
Mon Nov 20 02:25:43 CET 2023


By the way, why exec rm instead of kill?
I mean, I also use shell rm instead of kill due to some gut feeling, 
don't know why.

Dmitry.

20.11.2023 6:35, Jussi Lahtinen пишет:
> I think you are correct, but why bother?
>
> Jussi
>
> On Mon, Nov 20, 2023 at 12:33 AM Bruce Steers <bsteers4 at gmail.com> wrote:
>
>     Do you think it is a bad idea to clean the /tmp/gambas100/ dir ?
>
>     I added this code to my Gambas3 startup....
>
>       Dim sDir As String = File.Dir(File.Dir(Temp()))
>       For Each s As String In Dir(sDir, "*", gb.Directory)
>         If s Match "^[0-9]+$" Then
>          If Not Exist("/proc" &/ s) Then Exec ["rm", "-rf", sDir &/ s]
>         Endif
>       Next
>
>     So all folders in gambas.1000 that are just a number are matched
>     to folders in /proc/
>     if the /proc/ folder does not exist the gambas folder is also deleted.
>
>     That shouldn't break anything right?
>
>     Respects
>     BruceS
>
>
>     ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
>
> ----[http://gambaswiki.org/wiki/doc/netiquette  ]----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231120/a5645b16/attachment.htm>


More information about the User mailing list