PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part B Shell Commands Professional Training.

Slides:



Advertisements
Similar presentations
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Advertisements

NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
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.
Linux+ Guide to Linux Certification, Second Edition
CSE 303 Lecture 2 Introduction to bash shell
Guide To UNIX Using Linux Third Edition
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
Lecture 01CS311 – Operating Systems 1 1 CS311 – Lecture 01 Outline Course introduction Setting up your system Logging onto the servers at OSU with ssh.
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
Grep, comm, and uniq. The grep Command The grep command allows a user to search for specific text inside a file. The grep command will find all occurrences.
Embedded Programming and Robotics Lesson 13 Basic Linux 1.
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.
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.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Learning basic Unix command IT 325 operating system.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  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.
© Crown copyright Met Office An Introduction to Linux PRECIS Workshop, University of Reading, 23rd – 27th April 2012.
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.
Linux Directory Navigation. File & Directory Commands This is a minimal list of Unix commands that you must know for file management: ls (list) mkdir.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
Guide To UNIX Using Linux Fourth Edition
Unix Basics Chapter 4.
Introduction to Unix (CA263) File Processing. Guide to UNIX Using Linux, Third Edition 2 Objectives Explain UNIX and Linux file processing Use basic file.
Basic unix commands that everyone should know (Even if you have a mac) Slightly more advanced:
Linux+ Guide to Linux Certification, Second Edition
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Managing Files. Module 5 Managing Files ♦ Introduction “On a Linux system, everything is a file; if something is not a file, it is a process.” ♦ Topics.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Introduction to UNIX Geraint Vaughan. What is UNIX? Command-line operating system (not point- and click) Designed for ‘experts’ Lots of different variants.
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.
Tera Term Brian Smith Chris Vasse Zaheemat Adetoro William Newton Tom Presgraves.
Linux+ Guide to Linux Certification, Third Edition
CS252: Systems Programming Ninghui Li Slides by Prof. Gustavo Rodriguez-Rivera Topic 7: Unix Tools and Shell Scripts.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 2a – A Unix Command Sampler (Courtesy of David Notkin, CSE 303)
Linux Commands C151 Multi-User Operating Systems.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part A Shell Commands Professional Training.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
Linux Stuff Last Update Copyright 2014 Kenneth M. Chipps Ph.D. 1.
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.
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.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
The Unix File sytem. Introduction Tree structure …
Unix Fundamentals CS 127. File navigation cd - change directory cd /var/log cd /etc/apache2 cd ~/Desktop ~ is a shortcut for the home directory.
Learning basic Unix command It 325 operating system.
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 Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Learning Unix/Linux Based on slides from: Eric Bishop.
Getting started with CentOS Linux
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 Commands Workout 1
Linux 101 Training Module Linux Basics.
Some Linux Commands.
C151 Multi-User Operating Systems
The Command Prompt Commands are the way to “do things” in Unix
Useful Linux Commands.
LING 408/508: Computational Techniques for Linguists
The Unix File System.
Chapter Four UNIX File Processing.
Getting started with CentOS Linux
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Working with Mac OS and Linux
Module 6 Working with Files and Directories
Lab 2: Terminal Basics.
LPI Linux Certification
Presentation transcript:

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part B Shell Commands Professional Training Academy Linux Series

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Manipulation cp : copy a file – To copy a file you need to give a source and then a destination – e.g. to copy the file poetry.txt to poetry_backup.txt, type: cp poetry.txt poetry_backup.txt cp –r : copy a directory – The –r stands for recursive which copies everything within a directory – e.g. to copy the directory course_work to course_work_backup, type: cp –r course_work course_work_backup

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Manipulation mv: move a file or directory – As with copy, the move command also needs a source and a destination – e.g. to move the course_work directory to new_course_work, type: mv course_work new_course_work – Note: To rename a file or directory in Linux, use the mv command

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Removal Warning: Removing files and directories is very easy and you may not be asked to confirm. Be very careful! rm: remove a file – e.g. to remove a file called poety.txt, type: rm poetry.txt rm –r: remove a directory – e.g. to remove a directory named course_work_backup, type: rm –r course_work_backup

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Removal rmdir: remove an empty directory – rmdir can be used as a check. If you want to be sure that the directory you are deleting is empty. rmdir my_empty_directory

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Searching find: search for a file or directory – e.g. to search for a file named project_results within the current directory, type: find./ -name project_results –print locate: search for a program – e.g. to search for the location of the gedit text editor, type: locate gedit

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Searching which: print the location of a program – e.g. to find out where the ls command is stored in the filesystem, type: which ls

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Searching grep – search for regular expressions in files – e.g. to search for the word “and” in the poetry.txt file, type: grep and poetry.txt – Note: If the word is not found within the poetry.txt file, grep will not print anything. However, if the word is found, grep will print the line where the word was found To search for the word “and” in all files in all directories, type: grep –r and *

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Searching To make the search case-insentive, type: grep –i and poetry.txt To search for the word “and” inside words, type: grep *and* poetry.txt You can also search for strings, e.g. grep “to be or not to be” poetry.txt

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Help man: lookup a manual page for a command – Note: All commands in Linux have separate manual pages. You can use these to figure how to use a command or to find extra options. These options are called arguments. For example, when we used ls – l, the –l was the argument to the ls command – e.g. to look up the manual page for ls, type: man ls Use the space bar to browse page by page To quit type q

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Commands: Help To search for a word within the manual pages, type forward slash / – The bottom left of the man page will then allow to you type a search word – All occurrences of the word will be highlighted – You can type n (for next) or p (for previous) to move to the next or previous occurrence

PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Exercises 1)Change into your projects directory and copy the poetry.txt to poetry_backup.txt 2)Copy your projects directory to a directory called projects_backup 3)Rename the projects_backup directory as projects_completed 4)Change into the projects_completed directory and delete the poetry_backup.txt file 5)Search the poetry.txt file for the word “tHe” or any other mixed case word in your file 6)Lookup the manual page for the copy command and search for the word recursive