<jupyter_start><jupyter_text>Basic *nix Commands - Users & System  Who, where, what, when...?  Structure of a UNIX command$$\overbrace{\mathtt{ls}}^{\text{Command}} \quad \underbrace{{\overbrace{\mathtt{-s -t}}^{\text{Options}} \quad \mathtt{arg1 \quad arg2}}}_{\text{Arguments}}$$  Who?  Machine and OS* `hostname` - print the machine's hostname* `uname` -  print other system information    * `uname`- print OS name    * `uname -a` - print **a**ll system information    * `uname -m` - print **m**achine hardware    * `uname -n` - same as `hostname`  Users* `passwd` - change your **passw**or**d*** `who` - print logged in users (see also `users`)    * `who am i` - print your own username `whoami`* `finger` - display information about users  What?  List  * `ls` - **l**i**s**t directory contents    * `ls -a` - list **a**ll    * `ls -A` - list **A**lmost all    * `ls -l` - **l**ong listing format * Multiple options can be combined, e.g. * `ls -l -A` $\equiv$ `ls -lA`  Environment variables* The system uses *environment variables* to store system and user information    * define with `export MY_NEW_VAR='myVAr'` (**`bash`** shell)    * access with `$`, e.g. `echo $MY_NEW_VAR`  Where?  Navigation commands* `pwd` - **p**rint **w**orking **d**irectory * `cd` - **c**hange **d**irectory    * `cd $HOME` or better, `cd ∼`, even better `cd`    * `cd ∼-` - go to previous directory     * `cd ..` - go up one level    * Absolute *paths* (directory structures) start with `/`, the *root* directory  When?  Date* `date` -- display the full date    * `date +%m` – the `+%m` is a format specifier instruction to only print the month number    * `date +%h` – the `+%h` is a format specifier instruction to only print the month string   Getting Help  `man` documentation* `man ls` - brings up the `man`ual pages for `ls`  Use Google!* Use good keyword strings "Linux ls" or "Unix echo"<jupyter_code>%%javascript
function hideElements(elements, start) {
    for(var i = 0, length = elements.length; i < length;i++) {
        if(i >= start) {
            elements[i].style.display = "none";
        }
    }
}

var prompt_elements = document.getElementsByClassName("prompt");
hideElements(prompt_elements, 0)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16412556053811658, 'fraction_numerical': 0.0017937219730941704, 'mean_word_length': 3.6576200417536535, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '546630', 'license': 'MIT', 'n_tokens_mistral': 733, 'n_tokens_neox': 706, 'n_words': 258, 'path': 'BasicUnixCommands-Users_and_System-rise.ipynb', 'repo_name': 'PGE383-HPC/live_lectures', 'size': '2230'}