Hi,
I've setup a samba share with RecycleBin option.
However, there is no cleanup and soon will saturate free space.
I'm trying to plan a command that each week clean the content of those dir or the directory itself.
The dir tree is like /home/ :
- user1
- user2
- samba
- groups
- netlogon
- profiles
- shares
I think
find is the easy way.
Further more I wish some of those dir are excluded: in the following example "mango" directory.
Code:
find . -name mango -prune -o -name 'RecycleBin' -type d -exec rm -rf {} \;
If works fine but I get an error message:
Code:
rickyx@Balenotterax:~/Scrivania/testrb$ find . -name mango -prune -o -name 'RecycleBin' -type d -exec rm -rf {} \;
find: "./user 3/RecycleBin": File o directory non esistente
find: "./user 2/RecycleBin": File o directory non esistente
find: "./user 1/RecycleBin": File o directory non esistente
rickyx@Balenotterax:~/Scrivania/testrb$
I can't figure out where I'm wrong.
To be careful to all possible situations I'm testing this line in directory with spaces in names. I know is ugly and ... and ... but users are just used to and they don't care about me
And, having this line working for spaces I can use it for other situations other than shares.
File o directory non esistente = File or directory does not exist
Thank you,
Ricky