User Tools

Site Tools


megacmd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
megacmd [2020/02/25 19:05]
ian created
megacmd [2020/02/25 19:40] (current)
ian
Line 3: Line 3:
 MEGA provides up to 50 GB of free, fully-encrypted cloud storage MEGA provides up to 50 GB of free, fully-encrypted cloud storage
  
-They also provide a number of CLI tools that allow you to connect and manage your cloud storage from the command-line.+They also provide a number of CLI tools that allow you to connect and manage your cloud storage from the command-line. Install from https://mega.nz/cmd
  
 ''rclone'' would be my preference, just because of familiarity and the abstraction that it provides - but it does not allow the use of the 2FA/MFA configured on my MEGA account ''rclone'' would be my preference, just because of familiarity and the abstraction that it provides - but it does not allow the use of the 2FA/MFA configured on my MEGA account
Line 11: Line 11:
 <code> <code>
 mega-login --auth-code=999999 <email> <password> mega-login --auth-code=999999 <email> <password>
-mega-exclude -a *.RW2+mega-exclude -a *.RW2 *.nef
 mega-mkdir /images mega-mkdir /images
 mega-sync /data/images /images mega-sync /data/images /images
Line 21: Line 21:
 ID LOCALPATH                                                                         REMOTEPATH                                                                        ActState   SyncState     SIZE  FILES   DIRS ID LOCALPATH                                                                         REMOTEPATH                                                                        ActState   SyncState     SIZE  FILES   DIRS
  0 /data/images                                                                      /images                                                                           Active     Syncing   28.22 GB   9555    270  0 /data/images                                                                      /images                                                                           Active     Syncing   28.22 GB   9555    270
 +</code>
 +
 +You can use mega-find to ensure that no .RW2 files have slipped through (the mega-exclude patterns are case sensitive)
 +<code>
 +$ mega-find /images --use-pcre --pattern='(?i).*rw2' -l
 +</code>
 +
 +I forgot to exclude .nef files from a different camera
 +<code>
 +$ mega-find /images --use-pcre --pattern='(?i).*nef' | while read file; do mega-rm -vvv "${file}"; done
 </code> </code>
  
megacmd.1582675545.txt.gz ยท Last modified: 2020/02/25 19:05 by ian

free spam filter