Chapter 1 : The Linux System Part 2 Lecture 2 11/14/2015 1.

Slides:



Advertisements
Similar presentations
DOS & Windows O/s Prof. Sujata Rao Less 5.
Advertisements

Operating Systems. Operating System (OS) The software that manages the sharing of the resources of a computer. Examples of Operating Systems ◦ Windows.
Tony Kombol.  A program that  receives commands from a text input device (e.g. keyboard)  passes them to the operating system to perform  In the.
Lab6 CPCS361 I.Mona Alshehri. Working with Files and Directories Creating files Create a file with the cat command type the command cat > name_of_file.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
Chapter 5 Accessing Files and Directories. How Directories Get Created OS installation: usr, dev, etc, export, kernel and others places to store installation.
Linux Files. Files and directories As in Windows directories are structures which contain –Other directories –Files.
Guide To UNIX Using Linux Third Edition
UNIX By Darcy Tatlock. 1. Successful Log Into Unix To actively manipulate your website you need to be logged in. Without being logged in you cannot enter.
Basic UNIX © McGraw Hill All rights reserved.
1 Some basic Unix commands u Understand the concept of loggin into and out of a Unix shell u Interact with the system in a basic way through keyboard and.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.
Laboratory Exercise # 3 – Basic File Management Office Productivity Tools 1 Laboratory Exercise # 3 Basic File Management Objectives: At the end of the.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
Guide To UNIX Using Linux Fourth Edition
EMT 2390L Lecture 2 Dr. Reyes. Outline What is the Shell Basic commands Linux Filesystem System commands.
1 Day 3 Directories Files Moving & Copying. 2 Case Sensitive First thing to learn about UNIX is that everything is case sensitive. Thus the files: –enda.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
The file structure and related utilities CS240 Computer Science II.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Unix Basics Chapter 4.
Interacting with a UNIX computer: Navigating through the directory tree.
ICT Foundation 1 Copyright © 2010, IT Gatekeeper Project – Ohiwa Lab. All rights reserved. File and Directory.
Chapter Two Exploring the UNIX File System and File Security.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Linux file system "On a UNIX system, everything is a file; if something is not a file, it is a process." Sorts of files (on a Linux system) Directories:
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Chapter Two Exploring the UNIX File System and File Security.
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
Log-in to the Unix Server A successful log-in allows access to the server through the Secure Shell. SSH, also known as Secure Shocket Shell, is a Unix.
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
1.  Microsoft DOS (Disk Operating System) use a command line user interface.command line  A command line user interface means that the user is required.
Unix Commands PowerPoint Presentation developed for LS 560 Information Technology online class - University of Alabama by Debey Sklenar TENacious Cohort.
Lecture One. Objective: Provide description of the Command-Line Editor of Linux operating system. Enable students to understand the practical side of.
E X C E E D I N G E X P E C T A T I O N S Basic LINUX Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Directory structure:
Lab 0 / Chapter 0 Windows XP Environment. 2 User Interfaces: A different perspective.
Introduction to Programming Using C An Introduction to Operating Systems.
The Genome Analysis Centre Building Excellence in Genomics and Computational Bioscience.
Λειτουργικά Συστήματα – Lab2 Γιάννης Πετράκης. Directory Navigation and Control  The Unix file system is set up like a tree branching out from the root.
Linux Commands C151 Multi-User Operating Systems.
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
BIF713 File and Directory Management. File System A File System is a structure used to organize programs and data on a computer ’ s storage device Files.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
CMSC 104, Version 8/061L03OperatingSystems.ppt Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
1 Linux Commands. 2 Path You specify a file or directory by its path name:  the full, or absolute, path name or the one relative to a location. The full.
Navigating the Filing System
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
The Command Prompt Commands are the way to “do things” in Unix
Exploring the UNIX File System and File Security
Unix : Introduction and Commands
Operating Systems and Using Linux
The Linux Command Line Chapter 4
Module 6 Working with Files and Directories
Lab 2: Terminal Basics.
The Linux Command Line Chapter 4
Presentation transcript:

Chapter 1 : The Linux System Part 2 Lecture 2 11/14/2015 1

Objectives: What Is The Shell? Terminal Emulators Some simple commands File system: The Current Working Directory Listing The Contents Of A Directory Changing The Current Working Directory Processing files and folders: cp : Copy files and folders mv : Move/rename files and folders mkdir : Create folders Rm: Remove files and folders 11/14/2015 2

3 What Is The Shell? When we speak of the command line, we are really referring to the shell. The shell is a program that takes keyboard commands and passes them to the operating system to carry out. Terminal Emulators: When using a graphical user interface, we need another program called a terminal emulator to interact with the shell. If we look through our desktop menus, we will probably find one.

11/14/ Your First Keystrokes: So let's get started. Launch the terminal emulator! Once it comes up, we should see something like this: This is called a shell prompt and it will appear whenever the shell is ready to accept input. While it may vary in appearance somewhat depending on the distribution, it will usually include your followed by the current working directory (more about that in a little bit) and a dollar sign.

11/14/ Some simple commands: Try Some Simple Commands Now that we have learned to type, let's try a few simple commands. The first one is date. This command displays the current time and date. A related command is cal which, by default, displays a calendar of the current month.

11/14/ to display the amount of free memory, type the free command. Ending A Terminal Session We can end a terminal session by either closing the terminal emulator window, or by entering the exit command at the shell prompt: Some simple commands:

11/14/ File system: The first thing we need to learn to do (besides just typing) is how to navigate the file system on our Linux system. In this chapter we will introduce the following commands: ● pwd: Print name of current working directory ● ls: List directory contents ● cd: Change directory Understanding The File System Tree: Like Windows, a Unix-like operating system such as Linux organizes its files in what is called a hierarchical directory structure. This means that they are organized in a tree-like pattern of directories (sometimes called folders in other systems), which may contain files and other directories. The first directory in the file system is called the root directory. The root directory contains files and subdirectories, which contain more files and subdirectories and so on and so on.

11/14/ The Current Working Directory: the command line has no pictures, so to navigate the file system tree we need to think of it in a different way. Imagine that the file system is a maze shaped like an upside-down tree and we are able to stand in the middle of it. At any given time, we are inside a single directory and we can see the files contained in the directory and the pathway to the directory above us (called the parent directory) and any subdirectories below us. The directory we are standing in is called the current working directory. To display the current working directory, we use the pwd (print working directory) command.

11/14/ Listing The Contents Of A Directory: To list the files and directories in the current working directory, we use the ls command. Actually, we can use the ls command to list the contents of any directory, not just the current working directory.

11/14/ Changing The Current Working Directory: To change your working directory (where we are standing in our tree-shaped maze) we use the cd command. To do this, type cd followed by the pathname of the desired working directory. A pathname is the route we take along the branches of the tree to get to the directory we want. Pathnames can be specified in one of two different ways, as absolute pathnames or as relative pathnames. *Absolute Pathnames: An absolute pathname begins with the root directory and follows the tree branch by branch until the path to the desired directory or file is completed. For example, there is a directory on your system in which most of your system's programs are installed. The pathname of the directory is /usr/bin. This means from the root directory (represented by the leading slash in the pathname) there is a directory called "usr" which contains a directory called "bin".

11/14/ Processing files and folders: This chapter will introduce the following commands: cp : Copy files and folders mv : Move/rename files and folders mkdir : Create folders Rm: Remove files and folders These four commands are among the most frequently used Linux commands. They are used for manipulating both files and directories. Now, to be frank, some of the tasks performed by these commands are more easily done with a graphical file manager. With a file manager, we can drag and drop a file from one directory to another, cut and paste files, delete files, etc. So why use these old command line programs? The answer is power and flexibility. While it is easy to perform simple file manipulations with a graphical file manager, complicated tasks can be easier with the command line programs. For example, how could we copy all the HTML files from one directory to another, but only copy files that do not exist in the destination directory or are newer than the versions in the destination directory? Pretty hard with a file manager. Pretty easy with the command line.

11/14/ cp : Copy files and folders: The cp command copies files or directories. It can be used two different ways: to copy the single file or directory “item1” to file or directory “item2” : to copy multiple items (either files or directories) into a directory. 2- mv : Move/rename files and folders: The mv command performs both file moving and file renaming, depending on how it is used. In either case, the original filename no longer exists after the operation. mv is used in much the same way as cp:

11/14/ to move or rename file or directory “item1” to “item2”. to move one or more items from one directory to another. 3- mkdir : Create folders: The mkdir command is used to create directories. It works like this:

11/14/ would create a single directory named “dir1”. would create three directories named “dir1”, “dir2”, and “dir3”. 4- Rm: Remove files and folders: The rm command is used to remove (delete) files and directories: where “item” is one or more files or directories.