Presentation is loading. Please wait.

Presentation is loading. Please wait.

Navigating the Filing System

Similar presentations


Presentation on theme: "Navigating the Filing System"— Presentation transcript:

1 Navigating the Filing System

2 Getting Started…. Go to https://www.codecademy.com
Create an account by clicking the “Sign Up” tab and follow the directions. MAKE SURE YOU RECORD YOUR USERNAME AND PASSWORD AND DO NOT FOR GET IT !!!! (I do not have access to your account at all, so I cannot reset any passwords or find user names)

3 Now that you are Logged in
Click on the “Catalog” tab in the top right hand corner of the website. Scroll Down and find “Learn the Command Line” Corner. There are four main topics we will cover so you can understand a bit about the command line: Navigate the file system Viewing and Changing the File System Redirecting Input and Output Configuring the Environment

4 Let’s Begin Click on the Navigating the File System, then click on the Navigation – Interactive Lesson icon. You are now in the interactive space of Code Academy. From here on in, the PowerPoint Lesson will indicate what you need to do on your screen, and will identify what is happening on your screen and what you accomplished.

5 The Command Line The command line is a text interface for your computer. It's a program that takes in commands, which it passes on to the computer's operating system to run. From the command line, you can navigate through files and folders on your computer, just as you would with Finder on Mac OS or Windows Explorer on Windows. The difference is that the command line is fully text-based. The advantage of using the command line is its power. You can run programs, write scripts to automate common tasks, and combine simple commands to handle difficult tasks - making it an important programming tool.

6 The LS Command In the terminal, after the $ type: ls
Then hit Enter (always hit enter after you type the command you are inputting) You should see : 2014  2015  hardware.txt      In the terminal, first you see $. This is called a shell prompt. It appears when the terminal is ready to accept a command. When you type ls, the command line looks at the folder you are in, and then "lists" the files and folders inside it. The directories 2014,2015, and the File  hardware.txt are the contents of the current directory.

7 File System Note: When using the command line, we refer to folders as directories. Files and directories on your computer are organized into a filesystem. Click Next

8 File System A filesystem organizes a computer's files and directories into a tree structure: The first directory in the filesystem is the root directory. It is the parent of all other directories and files in the filesystem. Each parent directory can contain more child directories and files. Here blog/ is the parent of 2014/, 2015/, and hardware.txt. Each directory can contain more files and child directories. The parent-child relationship continues as long as directories and files are nested.

9 PWD Pwd stands for "print working directory". It outputs the name of the directory you are currently in, called the working directory. Here the working directory is blog/. In Codecademy courses, your working directory is usually inside the home/ccuser/workspace/directory. Now, print the working directory by typing pwd after the $ Type: cd 2015 Type: pwd You should now see /home/ccuser/workspace/blog/2015, you have just changed to the child directory 2015.

10 CD .. Type: pwd Type: cd jan/memory/
You just changed into the child directory memory. Type pwd to see the current working directory you are in Type: cd .. (Notce the space between the “D” and the “..”) Type: pwd (Notce what we did, we just moved back up one directory)

11 cd .. cd is used to change the working directory below or ahead, cd .. is used to change the working directory up or back one directory. Now change the directory to 2015/feb/ Type: pwd to identify the directory you are in… recall to get to the february child directory we have to go back to the 2015 directory and then go into the feb directory.                  

12 CD Go back to the blog directory by typing cd .. Until you get there
Type: cd 2015/feb/ (this will put us in the february directory) Type: ls (this will list the directories we can move into) This directory has: circuit-board.txt  input-output.txt  power-supply.txt                         

13 mkdir Type mkdir media (this will make a media directory in the current working directory) Type ls to see if the new directory has been created, you will now see a media directory. The mkdir command stands for “make directory.” it creates a new directory in the working directory.

14 Touch Go back to the blog directory by typing cd .. Until you get there Type: cd 2014/dec Type: ls (you will see monitor.txt  mouse.txt) Type: touch keyboard.txt Type: ls (you will now see kyboard.txt has been added in this directory) The Touch command creates a new file inside the working directory. It takes in the filename you typed and creates an empty file. You could use .doc and it would create an empty word document, in our case we created a text file.

15 Summary The command line is a text interface for the computer's operating system. To access the command line, we use the terminal. A filesystem organizes a computer's files and directories into a tree structure. It starts with the root directory. Each parent directory can contain more child directories and files.

16 Summary From the command line, you can navigate through files and folders on your computer: pwd outputs the name of the current working directory. ls lists all files and directories in the working directory. cd switches you into the directory you specify. mkdir creates a new directory in the working directory. touch creates a new file inside the working directory.

17 Assignment Use the filing system from Code Academy and create the same filing system in the website. (The next slide has the hierarchy for reference) After doing that, create your own filing system on the website. Create a filing system that starts with your name at the top and has approximately 30 – 40 directories, files, images, videos and etc… Use if tutorialspoint.com does not work.

18 Hierarchy Blog 2014 2015 Hardware.txt Dec Jan Feb Motherboard.txt
Monitor.txt Mouse.txt 2015 Jan Memory Cpu.txt Feb Circuit-board.txt Input-output.txt Power-supply.txt Motherboard.txt Hardware.txt


Download ppt "Navigating the Filing System"

Similar presentations


Ads by Google