[SOLVED] Automate removal of rogue directories generated by Nvidia Shield TV (Android) on Linux shares.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Automate removal of rogue directories generated by Nvidia Shield TV (Android) on Linux shares.
Hi there,
My name is Alex, and this is my first post. I'm going to try to keep this short. Android is incredibly difficult to control, and I'm sure someone out there knows what I'm talking about when I say it spreads it's seed (Android directories) to everything it touches.
I'm using LibreELEC 8.0.1, and I can easily access the CLI via SSH from my Mac's Terminal. LibreELEC and Kodi forum posts keep racking up views, but either nobody cares to answer, or nobody in those communities knows.
Both B and C are currently active, with no improvement. These are commands I found online - I'm a noob with enough
logic to be able to deconstruct a command and its parameters at least somewhat.
What should I be doing?
A) Somehow making Android stop generating these directories? (Customization on Android TVs seems nearly impossible.)
B) edit samba.conf, add the lines below to each preconfigured share
veto files = /Android/
delete veto files = yes
C) cron job - command works manually, but not via cron daemon (see screenshot)
root seems to have a cron.
you stuck this find command into it? or a script (something you ALLOWED)?
Thanks for your reply, Habitual.
I'm not sure - other than this, I'm running LibreELEC with mostly default settings.
In the LibreELEC settings (simply an additional GUI menu amongst the standard Kodi menus, there is an option for cron to be turned on or off. Of course I have it turned on.)
At the command line, I
Code:
crontab -e
and the resulting document was blank. I typed in the command you see in the screenshot, which I had already verified worked at the command line (which is also demonstrated in the screenshot), saved the crontab file, and from the looks of it, it's running the manually validated command every 10 minutes, yet these directories are still present, even when the Android device is off.
Also when I manually run the command, I can see the an Android folder disappear in Finder on my Mac. But I never see it disappear if I leave a Finder window open and wait on the cron job.
Again, this is all new to me; if there's something else to know about the cron function that I'm missing, please let me know.
When you say root seems to have a cron - does that mean I should be doing this elsewhere? I typed cd / before crontab -e. Should I be at a user prompt?
I figured it out. I added cd / before and cd ~ after the find & xargs commands, and since it was properly running from root that way, it solved the problem!
LOL. Hey, it's a good habit whether in day to day life or behind the keyboard. (And especially I suppose when those two scenarios are one and the same.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.