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.

Move large folders with script

Featured Replies

Need some help. I'm trying to set up unraid to move any folder larger than 5G in my download folder to a watch folder I have set up with the handbrake docker. Any one know how I can accomplish this? 

Edited by Tjlejeune

Here is a script you can use.  Just replace source and target with your folder paths.

#!/bin/bash

limit=4G
source="/mnt/user/source"
target="/mnt/user/target"

limit=$(echo $limit | cut -d 'G' -f 1)

for dir in "$source"/*/
do
	size=$(du -sBG "$dir" | cut -d 'G' -f 1)

	if (( $size > $limit ))
	then
		echo $size\G $dir \-\> $target
		mv "$dir" "$target"
	fi
done

moveDirBySize.sh

Edited by JoeUnraidUser
updated to handle spaces in folder names

  • Author

Thank you. Works as long as there's no spaces in the folder name

2 hours ago, Tjlejeune said:

Thank you. Works as long as there's no spaces in the folder name

Try it now.  I updated it to handle spaces in folder names.

Edited by JoeUnraidUser

  • Author

Oh, quotes were needed around $target. Tried fixing that myself but missed that. Thanks again

Archived

This topic is now archived and is closed to further replies.

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.