Index of /examples/matlab/Tutorials/Archive/Previous/orig/misc/tmp/howto-sync-files

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[   ]makeMacros.m 2014-10-21 14:29 3.4K 

How to generate and activate file-syncing macros in MobaXterm

This README file explains and demonstrates the procedure for creating the necessary Linux configuration file to facilitate file syncing between a folder on your PC with another on the SCC.

Upon downloading and running an m-file, two customized macros, cp2scc and cp2pc, will be created. The cp2scc copies (or sync) from a folder (whose path and name you specified while running the m-file) on the PC to a designated folder on the SCC. Similarly, the cp2pc lets you copy from the SCC to the PC.

Note that while a MATLAB example is given, the procedure in general is not limited to MATLAB. Note also these notations throughout this page:

MobaXterm basics

Before we go on to the main topic, let's review the following MobaXterm file structure layout and naming. When you launch MobaX by clicking on the MobaX icon, the only window tab that appears, by default, is your /home/mobaxterm folder (the tab itself indicates that).

Creation of .bash_profile Configuration file for /home/mobaxterm

  1. Find out where your local PC matlab folder path is in MobaXterm representation. It should have the general form of /drives/c/windows/....
  2. On the SCC, decide where you want to copy your PC's matlab folder over. (/usr3/graduate/... or /project/project-name/userID/...)
  3. Go to your SCC home directory (you may already be there)
    scc1:~ $ cd
  4. Copy a folder
    scc1:~ $ cp -rp /project/scv/examples/matlab/misc/file_sync .
  5. A new folder file_sync below your home directory has been created. Let's go there
    scc1:~ $ cd file_sync
  6. Launch matlab from file_sync
    scc1:~ $ matlab&
  7. This folder contains two files: makeMacros.m, README.html. Lets confirm that with
    >> ls
    README.html* makeMacros.m
  8. Run the m-file to generate necessary files
    >> makeMacros    % run this on the SCC
    Answer 3 questions (source and destination path and file names, userID on the SCC). The folder should now contain
    README.html*  cp2pc         cp2scc        makeMacros.m  move2bin*
  9. Next, switch to the /home/mobaxterm tab
  10. Copy the above listed files on the SCC by cut-and-paste the below line at the mobaxterm system prompt ([...] ->)
    Don't forget to replace your-userID with your SCC login name before pressing Enter.
    [...] -> scp -rp your-userID@scc1.bu.edu:~/file_sync/. /home/mobaxterm
  11. Execute the just generated move2bin script. It performs a few operational tasks
    [...] -> ./move2bin
  12. Make sure that things are as they should be; verify that you can access cp2scc from wherever you are with this command
    [...] -> which cp2scc
    It should tell you that it resides in /home/mobaxterm/bin.

How to use cp2scc, cp2pc

Both macros must be executed from /home/mobaxterm.


Note: Research Computing Services (RCS) example programs are provided "as is" without any warranty of any kind. The user assumes the entire risk of quality, performance, and repair of any defects. You are encouraged to copy and modify any of the given examples for your own use.