aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: share recursively folders in Shareddir.dat  (Read 6684 times)

esplinter

  • Approved Newbie
  • *
  • Karma: 2
  • Offline Offline
  • Posts: 17
    • http://lepetika.no-ip.com
share recursively folders in Shareddir.dat
« on: March 09, 2012, 03:59:11 PM »

Hi,

I have seen I can add as many folders as I wish to share in the config file "Shareddir.dat" but those folders aren´t shared recursively. Would be great to be able to decide which folders to share recursively and which not. Something like this maybe?

$> cat Shareddir.dat

RECURSIVE /path/to/my/shared/folder
NOT-RECURSIVE /path/to/my/second/shared/folder
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: share recursively folders in Shareddir.dat
« Reply #1 on: March 09, 2012, 09:11:01 PM »

This has been discussed in the past several times, and iirc was decided against.
You are not supposed to share huge recursive trees of a file system anyway, so it doesn't really matter that much.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

esplinter

  • Approved Newbie
  • *
  • Karma: 2
  • Offline Offline
  • Posts: 17
    • http://lepetika.no-ip.com
Re: share recursively folders in Shareddir.dat
« Reply #2 on: March 10, 2012, 01:29:42 PM »

Hi,

I don´t want to share too many dirs (just around 80). I have a collection of video files ordered in some subfolders and wanted to share all of them.

just used this workaround to add all the folders I want to share. in case is useful for anyone:

$> find /media/USB2TB/Peliculas/ -iname "*" -type d  >> $HOME/.aMule/shareddir.dat
Logged

stoatwblr

  • Sr. Member
  • ****
  • Karma: 12
  • Offline Offline
  • Posts: 318
Re: share recursively folders in Shareddir.dat
« Reply #3 on: April 09, 2012, 05:26:00 PM »

I wrote a little more complex script to generate the list:

$ cat /amule/Updateshatedir.sh
#!/bin/sh

find /ZFSMEDIA/AMULE/Mule-1/MULE /ZFSMEDIA/VIDEO/Video-1 -type f -not -empty -printf "%h\n" \
  | uniq \
  | grep -v lost+found \
  | grep -v /.Trash \
  | grep -v noshare \
  | sort -ur \
  | grep -v  NEW/ \
  > /amule/shareddir.dat

I know the antigreps can be done with one command but this is easier to read.
Logged