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.

exclude a directory on cache disk from being read by mover script

Featured Replies

Hi,

 

I would like to exclude a directory that I created on the cache disk from being processed by the mover script. I don't want to name the directory ".somename" since in OS X that directory will not be visible to the Finder. I looked at the mover script and see the find statement:

 

(cd /mnt/cache ;  \

find . \( -type d -regex '[.]/[^.].*'  -exec mkdir -p /mnt/user0/{}  \;  \) , \

        \( -type f -regex '[.]/.*/.*'  -exec mv -v {} /mnt/user0/{}  \;  \)  \

)

 

but don't know who to change the find command to exclude a top level folder. How would one permanently change the mover script? Isn't it created new every time you reboot your machine?

 

I also noticed that the folder that I created on the cache disk created a user share with the folder name, which surprised me.

I suspect to change it permanently, you would have to have a copy in your flash and make sure (using your go script) that you copy it back in place.

 

 

  • 6 months later...

Since upgrading to Pro i have been wondering about this same problem.  In OS X's Finder any file that begins with a "." is hidden.  Is there a way to change this permanently to say, "_", so that I can add a folder to the cache drive labeled "_somefolder" and then that folder would not be moved but i wold still be able to see the folder from Finder.

probably just as "easy" to change it in finder.

 

My best guess... (I don't have a cache drive, but this should work)

part of old mover script in /usr/local/sbin/mover

(cd /mnt/cache ; find . \

  \( -type d  -regex '[.]/[^.].*'                        -exec mkdir -p /mnt/user0/{} \; \) , \

  \( -type f  -regex '[.]/.*/.*'  ! -exec fuser -s {} \;  -exec mv -v {} /mnt/user0/{} \; \)  \

replacement part for new mover script:

(cd /mnt/cache ; find . \

  \( -type d  -regex '[.]/[^._].*'                                  -exec mkdir -p /mnt/user0/{} \; \) , \

  \( -type f  -regex '[.]/.*/.*'    ! -exec fuser -s {} \;  -exec mv -v {} /mnt/user0/{} \; \)  \

This will probably work... I added one underscore character, highlighted in red to the middle of the three lines above.. The directory names with a leading underscore would not be created under /mnt/user, and therefore the mv script could not succeed in moving anything, since the target directory would not exist.

 

It is not optimum, as it will still attempt to move the files, but since the target directory isn't there, no move will occur.  The existing script seems to do that with the files it processes.

 

Joe L.

Thanks for the help.

 

When i get a chance and my school stuff slows down i will try this out and see how i works.

  • 11 months later...
  • 1 year later...

Hey guys I am pretty new to linux and all.  I was wondering where or how I edit the script?  I am trying to do so by browsing the the flash drive.  What would I need to do to change it and make it stick after reboot?  I have been reading alot but everything assumes you know how to get to and edit that file.

 

Thanks

Hey guys I am pretty new to linux and all.  I was wondering where or how I edit the script?  I am trying to do so by browsing the the flash drive.  What would I need to do to change it and make it stick after reboot?  I have been reading alot but everything assumes you know how to get to and edit that file.

 

Thanks

 

What exactly are you trying to do.  Are you trying to do as I did and make it so folders with an "_" are also ignored?

 

If so, then take a look at this thread.

Perfect, that worked like a champ... now to just figure out how to make the _torrents folder not show up as a share now.

Perfect, that worked like a champ... now to just figure out how to make the _torrents folder not show up as a share now.

 

You should be able to set it so that it is not show on the network.  Just sat it to hidden and no on will be able to see it on the network.  You should be able to get to it still but you won't see it.

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.