For example, the absolute path to my desktop is /users/nick/desktop. An absolute path is like a street address: it fully specifies where you want to go. When you use an absolute path, your current working directory doesn’t matter. Recall that if you start a path with a /, your are specifying an absolute path. This requires knowing the exact path of the folder where you want to work, but if you know it, you can just type cd /THE/PATH/TO/WHERE/YOU/WANT/TO/GO. If the file you want is not somewhere inside your current folder, you can move your working directory up one folder by typing cd. If the file you want to find is in one of the folders in your current directory, move into that folder with the cd command (e.g. Use ls to see what folders and files are in your current directory. The first step-by-step: analogous to how you would find a file using the operating system GUI:Ĭheck where you are currently located with the pwd command (short for print working directory). There are two main ways to navigate your file system: In this section, we’ll briefly review how to nagivate your folder structure using the command line. That means that most of the principles you’re familiar with (like the way files are organized into folders) apply on the command line just like in your more familiar graphical user interface. Navigating Folders ¶Īs previously discussed in Command Line Basics, the command line is just a tool for interacting with your computer using text commands rather than by clicking around with a mouse on pictures of folders (i.e. using your Graphical User Interface, or GUI). Please download the file and place it somewhere easy to remember (desktop, downloads, etc.). You can find the 311 data we’ll be working with in a zipped file called NYC_311calls_2018.zip here. 311 takes calls about all sorts of issues, from noise complaints to issues with street lights to complaints about restaurant hygeine violations and rodent sightings. 311 is a citizen hotline set up by the city of New York for reporting non-emergency issues to the city. In this exercise we’re going to get some practice navigating and exploring files and folders from the command line by looking at some data from New York City’s 311 system. Welcome to the Command Line Basics Exercises! ¶
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |