Chapter Linux Basics. Acknowledgements This presentation was prepared by – Banyat Settapanich – Bahran Madaen This presentation will be updated later.

Slides:



Advertisements
Similar presentations
Utilizing the GDB debugger to analyze programs Background and application.
Advertisements

ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 27 th, 2009 Essential Unix Commands.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Lesson 22 – Introduction to Linux Systems Administration.
Linux+ Guide to Linux Certification, Second Edition
The Unix Shell. Operating System shell The shell is a command interpreter It forms the interface between a user and the operating system When you log.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Lecture 02CS311 – Operating Systems 1 1 CS311 – Lecture 02 Outline UNIX/Linux features – Redirection – pipes – Terminating a command – Running program.
Linux+ Guide to Linux Certification Chapter 12 Compression, System Backup, and Software Installation.
Linux Commands LINUX COMMANDS.
Review for Exam 1 Exam 1 on June 24 CSC 3320.
Chapter 11 Compression, System Backup, and Software Installation.
Brief introduction to UNIX A. Emerson CINECA, High Performance Systems.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
The file structure and related utilities CS240 Computer Science II.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Offline File Storage. Module 12 Offline File Storage ♦ Introduction Backup is usually done by first collecting all the data in a single archive file,
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
1 Lecture 2 Working with Files and Directories COP 3344 Introduction to UNIX.
Introduction to Shell Script Programming
Enabling the ARM Learning in INDIA ARM DEVELOPMENT TOOL SETUP.
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
Guide To UNIX Using Linux Fourth Edition
Unix Basics Chapter 4.
Dedan Githae, BecA-ILRI Hub Introduction to Linux / UNIX OS MARI eBioKit Workshop; Nov , 2014.
Linux+ Guide to Linux Certification, Second Edition
Jozef Goetz, expanded by Jozef Goetz, 2009 Credits: Parts of the slides are based on slides created by UNIX textbook authors, Syed M. Sarwar, Robert.
Introduction Use of makefiles to manage the build process Declarative, imperative and relational rules Environment variables, phony targets, automatic.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Guide to Linux Installation and Administration, 2e1 Chapter 7 The Role of the System Administrator.
Agenda Regular Expressions (Appendix A in Text) –Definition / Purpose –Commands that Use Regular Expressions –Using Regular Expressions –Using the Replacement.
BIF713 Additional Utilities. Linux Utilities  You have learned many Linux commands. Here are some more that you can use:  Data Manipulation (Reg Exps)
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.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: whereis, which, whoami, finger, passwd, cal, date Working with Files: cat, more, less.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
CSC414 “Introduction to UNIX/ Linux” Lecture 5. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Basic of UNIX For fresh members of SPARCS
Λειτουργικά Συστήματα – 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.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
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.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
Lesson 6-Using Utilities to Accomplish Complex Tasks.
File Management commands cat Cat command cat cal.txt cat command displays the contents of a file here cal.txt on screen (or standard out).
Linux Filesystem Management
Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha Fall 2015
Chapter 11 Command-Line Master Class
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.
Linux file system "On a UNIX system, everything is a file;
Lecture 2 Working with Files and Directories
C151 Multi-User Operating Systems
CS314 – Section 5 Recitation 1
INTRODUCTION TO UNIX: The Shell Command Interface
Makefile Tutorial CIS5027 Prof: Dr. Shu-Ching Chen
Operation System Program 4
Chapter Four UNIX File Processing.
Introduction Paul Flynn
Working with Mac OS and Linux
The Linux Command Line Chapter 4
Module 6 Working with Files and Directories
Linux Commands LINUX COMMANDS.
January 26th, 2004 Class Meeting 2
The Linux Command Line Chapter 4
Presentation transcript:

Chapter Linux Basics

Acknowledgements This presentation was prepared by – Banyat Settapanich – Bahran Madaen This presentation will be updated later

Introduction Command Line –The standard utilities for manipulating files –Features providing by shell File system Installation

Command line File handling utilities – mkdir (MaKe DIRectory) Example mkdir foo - creates a directory foo in the current directory mkdir –p images/misc docs - creates a directory misc in directory images

Command line – rm (ReMove) -r, or –R Delete recursively -I Request confirmation before each deletion -f The opposite of –I Example rm –i images/*.jpg file1 - Deletes all files which name ends with.jpg in the current directory rm –Rf images/misc/file* - Deletes without requesting confirmation the whole directory misc/ in directory images/ together with files in the currrent directory

Command line – mv (Move) -f Force file moving -i The opposite -v Verbose Example Mv –I/tmp/pics/*.gif - Move al files in directory /tmp/pics/ which name ends with.gif to the current directory mv foo bar - Rename file foo as bar

Command line – Cp (CoPy) -R Recursive copy -i Request confirmation before overwriting any files -f The opposite of –i -v Verbose Example cp –i /tmp/images/*images/ - Copies all file from directory /tmp/images to directory images/ of the current directory cp foo bar - Make a copy of file foo under the name bar in the current directory

Command line Handling File Attributes –chown, chgrp (change the owner and group of one or more files -R Recursive; to change the owner of all files and subdirectories in a given directory -v Verbose mode, describes all actions performed by chown -c Like –v, but only reports which files have been changed

Command line Example chmod –R o-w/shared/docs – Recursively removes write permission for “other” on all files and subdirectories of /shared/docs chmod –R og-w,o-x private – Recursively removes write permission for the group and others for whole directory private/, and removes the execution permission for others.

Command line Shell globbing patterns and regular expressions –? matches one and only one character, whatever that character –[…] match any character found into the brackets –[!…] match any character not found in the brackets –{c1,c2} matches c1 and c2

Command line Example image/cars,space[0-9]/*.jpg – All filenames ending with.jpg in directory image/cars, image/space0, …, image/space9, if such directories exist *[!a-z] – All files which names do not end with a lowercase letter in the current directory

Command line Redirections Example $ Is image/*.gif 1>file_list – command (1) is redirected (>) to the file named file_list Pipes Example Is images/*.gif | wc –1 – The standard output of the Is command is redirected to the standard input of the wc command

File System Files – Character mode files Special system files which share the particularity that their contents are not buffered – Block mode files Peripherals and as opposed to character files, their contents are buffered – Symbolic links Common heavily used file in the system startup procedure – Name pipes Similar to pipes used in shell but these one actually have names

File System Links –The directory itself (.) –Parent directory (..) Anonymous –Pipes The shell creates the pipe and operates before the pipe write to it –Name pipes Opposite to the pipes used by shell

File System Special files –Character mode Files were buffered –Block mode files Files were not buffered Symbolic links –Files of a particular type whose sole contents is an arbitrary string

File System File attributes –A (no Access time) –a (append only) –d (no dump) –i (immutable) –s (secure deletion) –S (Synchronous mode)

Installation Requirements –A computer with a working operating system –General knowledge of the operating system you use –Some space on your hard disk –A compiler (usually for the C language) and an archiver (tar)

Installation Compilation –Principle Translate a source code into a binary file Logically done by a C compiler Repetitive operations are handled by a utility name make

Installation –Four steps of compilation cpp: consists in replacing directive (preprocessors) by pure C instructions ccl: consists in converting C into assembly language as: consists in generating object (or binary) code from the assembly language ld: links all the object files (.o) and the associated libraries

Installation –Structure of a distribution An install file, which describes the installation procedure A readme file, which contains general information related to the program A copying file, which contains the license or describes the distribution conditions of the software A contrib or credits file, which contains a list of people related to the software

Installation A changes file, which contains recent improvements and bugfixes A makefile file, which allows compilation of the software A configure or Imakefile file, which allow one to generate a new Makefile A directory that contains the sources ( src ) A directory that contains the document ( doc )

Installation Decompression –tar.gz archive Gzip is a standard format Developed by the GNU project Consider as one of the best general compression tools Gzip is often associated with a utility name tar.tar

Installation –The use of GNU Tar v make tar verbose f is a required option z allows you to treat a “gziped” Tar allow you to perform several actions on an archive

Installation Configuration –Use Autoconf if a file named configure exists in the parent directory of the distribution –Use Imake if a file name Imakefile exists in the parent directory of the distribution –Run a shell script according to the contents of the INSTALL file

Installation Compilation –make The developer saves time because it allows one to efficiently manage compilation of his interests Compile and install the software in few command lines –Rules make operates in accordance with a system of dependencies Compiling a binary file requires to go through several stages

Installation –Go, go, go! make without argument just executes the compilation of the program make install compile and provides the installation of the required files at the right place on the file system make clean clears all the temporary files created by the compilation

Installation Support –Documentation Look on your disk in /usr/doc/HOWTO Type man to get documentation on the command –Technical support Newsgroup (on Usenet) comp.os.linux Several IRC channel (#linuxhelp) on IRCNET Ask the developer of the software

Installation –How to find free software FTP site sundite.unc.edu is probably the most complete sitehttp:// contains a lot of links to software working with GNU/Linuxhttp://linux-france.org/ for an exhaustive list of all of GNU softwarehttp://

Linux-Mandrake information source mandrake.com/guides71/en/mdkrefguide/f s-and-mntpoints.htmhttp:// mandrake.com/guides71/en/mdkrefguide/f s-and-mntpoints.htm FAQ/x13.htmlhttp://metalab.unc.edu/mdw/FAQ/Linux- FAQ/x13.html

End of presentation