{"cells": [{"cell_type": "markdown", "metadata": {}, "source": ["# Exercise 1.1: Command line exercises\n", "\n", "
"]}, {"cell_type": "markdown", "metadata": {}, "source": ["In this exercise, you will play around with the command line on your machine and get more familiar with it.\n", "\n", "**a)** Let's play around with some options for the `ls` command. First `cd` into a directory that has some interesting files in it (like `~git/bootcamp/command_line_tutorial`). Try the following if you are using `bash`.\n", "\n", " ls -F\n", " ls -G # Might not be as cool with Git Bash on Windows\n", " ls -l\n", " ls -lh\n", " ls -lS\n", " ls -FGLh\n", " \n", "You should be able to infer what these different options do, but you can ask the course staff as well.\n", "\n", "Normally, files that begin with a dot (`.`) are omitted when listing things. They are also generally omitted when you use your OS's GUI-based file handling system (like Finder on Macs). To see them, use `ls -a`. So, `cd` into your home directory (you remember how to do that, right?), and then do\n", "\n", " ls -a"]}, {"cell_type": "markdown", "metadata": {}, "source": ["**b)** The nuclear option to delete *everything* in a directory is `rm -rf`. The `r` means to delete recursively, and the `f` means to \"force\" deletion. I was going to give you an exercise that uses the nuclear option, but I'm not going to do that. So, just forget I said anything. For this part of the problem, I want you to discuss with someone else in the class *when* the nuclear option might be used, and what needs to be in place before exercising it."]}, {"cell_type": "markdown", "metadata": {}, "source": ["**c)** Try doing this if you are using macOS or Linux:\n", "\n", " ls /\n", " \n", "What is `/`? Try `cd`-ing there and seeing what's in there. **Do not delete anything!**"]}, {"cell_type": "markdown", "metadata": {}, "source": ["
"]}], "metadata": {"anaconda-cloud": {}, "kernelspec": {"display_name": "Python 3", "language": "python", "name": "python3"}, "language_info": {"codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.7"}}, "nbformat": 4, "nbformat_minor": 4}