Hello,
Please help!!!
How flexshare's recycle bin works? I deleted 10GB files, it's end up .trash folder. Then I need delete it again. Does ClearOS clean flexshare's trash folder?
Is there any scrip or settings to delete them like 30days?
If user wants to retrieval files, is there any other place to see?
Thanks in advance.
Please help!!!
How flexshare's recycle bin works? I deleted 10GB files, it's end up .trash folder. Then I need delete it again. Does ClearOS clean flexshare's trash folder?
Is there any scrip or settings to delete them like 30days?
If user wants to retrieval files, is there any other place to see?
Thanks in advance.
Share this post:
Responses (17)
-
Accepted Answer
-
Accepted Answer
I would check for empty folders, before deleting, below my update ...
find /var/flexshare/shares/*/.trash/ -mtime +30 -exec rm -f {} \;
find /var/flexshare/shares/*/.trash/ -type d -empty -mtime +30 -exec rmdir -v {} \;
find /home/*/.trash/ -mtime +30 -exec rm -f {} \;
find /home/*/.trash/ -type d -empty -mtime +30 -exec rmdir -v {} \; -
Accepted Answer
-
Accepted Answer
I run the following via cron every night.
find /sec/.recycle -mtime +12 -exec rm -f {} \;
find /sec/.recycle -mtime +12 -exec rmdir -v {} \;
Obviously my recycle bin is located in the .recycle directory. The 1st command removes files if older than 12 days in this case. The second removes directories, but only empty ones. Its not perfect. It can take an extra couple of runs to clean up directories, but it does work. -
Accepted Answer
-
Accepted Answer
Here is a simple script that I utilize on my servers. This and CRON are your friends. Hope this helps!
#!/bin/sh
# remove_q_recycle.sh
# intended to scan and delete files from under the server recycle directory older than XX minutes (mmin variable) or xx days (-mtime)
# run nightly ???
find /sec/Qdrive/.recycle -mtime +12 -exec rm -f {} \;
-
Accepted Answer
What would be nice would be to remove any empty directories after deleting the old trash files. Presumably it would need to run several times or be clever enough to check parent directories so it could remove directories that became empty as a result of removing empty directories within them.
Anyone got any thoughts on this? Thanks. -
Accepted Answer
Question wouldn't you need to add in rm -f -r if you have directory in trash?
How could I build this into the flexshare webui tab because I was thinking about it
And I wonder if you can run it through pipe-viewer and output the progress bar and print its status inside the webui I use pv for watching the progress of tar files -
Accepted Answer
Ryan wrote:
adding a script to the etc/cron.daily/ directory with the following
find /var/flexshare/shares/*/.trash/ -mtime +30 -exec rm {} \;
deletes all files with a modified date older than 30 days from all the .trash folders in flexshares
nice, thanks.
As root I created "empty-trash" in the cron.daily with the line in and then chmod it 755, this should be sufficient to make sure it execute properly? -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
Hi a22.
How flexshare's recycle bin works? I deleted 10GB files, it's end up .trash folder. Then I need delete it again. Does ClearOS clean flexshare's trash folder?
As you have discovered, the deleted files end up in the .trash folder. If you delete the files from .trash folder, those files will be completely deleted.
Is there any scrip or settings to delete them like 30days?
Nope, but that would be a nice feature.
If user wants to retrieval files, is there any other place to see?
The .trash folder is the only place.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »