简体   繁体   中英

Delete old files on MEGA using megatools

How I can delete old ( for example older than 7 days ) files on MEGA using megatools?

Thank you!

This how I solve this problem in ubuntu.

  1. I mount file system with the tools megafs.
  2. One of the few thing you are allow to do is remove files.

MOUNTPOINT = /mnt/path/your/mounting/dir MEGA_REMOTE_DIR = /Root/path/remote/dir/*

apt install megatools
megafs /mnt/path/your/mounting/dir 
find /mnt/path/your/mounting/dir/Root/path/mega/remote/dir/* -mtime +7 -exec rm {} \;
umount /mnt/path/your/mounting/dir

Maybe is posible other solutions using megals --long. Get the +7 days old and remove with megarm.

I hope this can help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM