Quantcast
Viewing all articles
Browse latest Browse all 25

Directory structure for modeling projects on linux

Syncing Machines with rsync:

Your folder structure on each machine (local, computing servers, backups etc) needs to be identical and synced using rsync. I have an exception in that I have a work folder on my home machine that contains all of my modeling projects. The contents of this folder are synced with the remote machines, but I only sync the parts I need to have on remote. To do this you need to learn rsync with its include/exclude lists functionality. Never scp anything, because it changes the timestamp on the file.

Folder structure

I compromise between speed of autocomplete on the command line and longevity. If you don’t mind typing you could have the folder prefix be the date, so e.g. 2023.10. but that’s a pain to autocomplete quickly when navigating in a terminal and using tab for completion. At the top folder level you can do a double letter system:

oliver@frankus:~/temp/work$ tree
.
├── aa.projectName
│   ├── 0.backgroundInfo
│   ├── 1.simSetup
│   ├── 2.MD
│   ├── 3.extraSimsSetup
│   └── 4.MD
├── ab.projectName
└── ac.projectName

The projectName should be descriptive like: collaboratorSystem e.g. aa.McDonaldFarm. If you have a new project with the same person later, you will know which is later from the prefix, so the next one might be ax.McDonaldMoo

Eventually you get to az and increment the first letter so you have ba, bb, bc etc. This is much less tabing for autocomplete than the date. If you ever make it to zz either get a new job, or archive your a* projects and start there again, with unique project names being the distinguisher in your backup folder.

In sub-folders I just use the numbering system starting at 0 and going to z. I never make it to z. Note in the above example it’s easy to tell that 2.MD came before 4.MD.

Shortcuts

If you have a remote server called tango and it’s directory structure is mounted somewhere called chill you want to sync from, you can do export tango=’oliver@chill:/tango_spaces/scratch1/oliver/’
Then when syncing it’s:
rsync -av $tango/myPath
Remember you paths are identical on both systems, so you don’t have to open remote in some cases, just copy the local path.


Viewing all articles
Browse latest Browse all 25

Trending Articles