Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Suche] Hilfe bei der Erstellung eines Scripts zum regelmäßigen Löschen leerer Ordner

Featured Replies

Hallo, ich glaube ich habe die Lösung schon gefunden, aber ich bin mir nicht sicher, ob es so richtig ist, vielleicht kann jemand einen Blick drauf werfen, bevor ich wirklich Daten lösche und mir einen Tipp geben.

Ich versuche in regelmäßigen Abständen die leeren Ordner in einem Sab Ordner zu löschen.

Nach etwas googeln bin ich auf die Möglichkeit der Userscripts gestoßen und dann auf den Befehl

find /path/to/folder/ -empty -type d -delete

 

Jetzt muss ich nur noch ein Script erstellen, das alle paar Tage einmal durchläuft, ist das in Ordnung oder muss am Ende noch etwas stehen?

#!/bin/bash
find /mnt/user/data/usenet/1/ -empty -type d -delete

 

Solved by Amane

Für solche Aufgaben kann ich sehr gut chatgpt. Damit habe auch mit jetzt schon sehr viel helfen können. Da ich selbst leider auch nie Programmieren gelernt hab.

Doch damit ist es jetzt wirklich für jedermann möglich. Klar nicht immer klappt es im ersten Anlauf, aber chatgpt ist da wirklich sehr geduldig.  

😄

  • Solution

Hallo

Etwas falschrum, ich würd so:

find /diretcory/.. -type d -empty -delete

 

Und niemals erst -delete und dann -empty!

 

Grüsse

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.