File management in this course

Simplest ways to obtain the teaching materials

  • Web \(\rightarrow\) Your PC \(\rightarrow\) Jupyterlab RStudio

  • All on the cloud

File explorer in RStudio’s bottom right pane

Four panes in RStudio

Your RStudio \(\approx\) Your Home Directory

  • Jupyterlab runs on OS Linux.

  • Each user was given a home directory to

    • read files

    • write (create or edit) files

    • execute program files.

  • You can see the entire file structure, but only read or write those folders that the IT admin or their owner made available to you.

  • Do not delete the bin and R folders.

Your Home directory

Upload from your computer to Jupyterlab RStudio

Download from Jupyterlab RStudio to your computer

Interactive Download from Jupyterlab RStudio

Move and Copy files in your RStudio

You want to copy a file into a folder in RStudio.

Copy a file into a folder in RStudio

You can as well save it under a different name.

Read other students’ RStudio folders

  • Students and teachers can read each others’ folders and copy from them.

  • Details at the end of this presentation.

Download teaching materials from GitHub

  • GitHub ≈ GoogleDrive for programmers

    • Files and folders in a dedicated repository

    • powered by a tool called Git

      • change tracking, sharing management

      • complex programmatic commands

  • Without Git: Download a repository or file to your PC

    • you only get the current snapshot

    • Go to the repository URL

    • use GitHub’s web GUI

GitHub Download Button

  • Hit the Code Button and Select Download ZIP

  • Each file has its own URL (click on it to get there)

  • You can also download the entire repo

Download from GitHub

Download a folder from GitHub

  • GitHub GUI Download works only for a file or a repository.

  • Use this web service to download a folder:

https://download-directory.github.io/?url=https://github.com/

THE_NAME_OF_THE_REPO/tree/main/THE_NAME_OF_THE_FOLDER

Download folders with download-directory.github.io

External web service download-directory.github.io

UFAL Linux Network

  • must-know if you

    • want to copy directly from teacher’s or students’ folders

    • get lost by inadvertently clicking on something in the Files tab.

  • / is the top of the file system. The home folder contains home folders of all users.

Your home is inside here.

Your home is inside here.

Alternative paths to your home

Your home as /home/YOURLOGIN

Path to your home as /lnet/aic/personal/YOURLOGIN

Do not ponder on it. It’s how the IT admin organized the file system.

Copy from someone’s home to yours - Step 1

Navigate upwards in the file structure to /home/ YOUR_COLLEAGUE’S_FOLDER

Copy from someone’s home to yours - Step 2

Select the item to copy (one file) and activate the menu

Copy from someone’s home to yours - Step 3

Select the target folder (probably your home). To select a subfolder, type ~/FOLDER_NAME.

Copy from someone’s home to yours - Step 4

  • Note that you are still in your colleague’s folder.

  • The file went ahead of you!

... Or select a subfolder interactively

Copy from someone’s home to yours - Step 5

Navigate home!

Copy from someone’s home to yours - Step 6

Mission accomplished!

Copy someone’s folder to your home

When you copy a folder, you must give the copy a name before saving.

Folder copy in your home, renamed