Session: Shell Programming Topic: Additional Commands

Similar documents
Lecture 5. Additional useful commands. COP 3353 Introduction to UNIX

Session: Shell Programming Topic: Advanced Commands

Utilities. September 8, 2015

Lab #1 Installing a System Due Friday, September 6, 2002

Linux Tutorial #7. quota. df (disk free) du (disk usage)

Lecture # 2 Introduction to UNIX (Part 2)

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

Computer Systems and Architecture

Practical Unix exercise MBV INFX410

Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX

Basic Linux Commands. Srihari Kalgi M.Tech, CSE (KReSIT), IIT Bombay. May 5, 2009

Fall Lecture 5. Operating Systems: Configuration & Use CIS345. The Linux Utilities. Mostafa Z. Ali.

Computer Systems and Architecture

Introduction to Linux Organizing Files

Unix Tools / Command Line

7. Archiving and compressing 7.1 Introduction

UNIX Basics. UNIX Basics CIS 218 Oakton Community College

Unzip command in unix

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface

5/20/2007. Touring Essential Programs

Handling Ordinary Files

No Food or Drink in this room. Logon to Windows machine

User Commands GZIP ( 1 )

CS 460 Linux Tutorial

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

UNIX and Linux Essentials Student Guide

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

Package Management System

1 Introduction Creating tar archives Extracting tar archives Creating tarballs Extracting tarballs...

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window.

IMPORTANT: Logging Off LOGGING IN

Chapter-3. Introduction to Unix: Fundamental Commands

CSC UNIX System, Spring 2015

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

Ubuntu unzip tar file

5/8/2012. Exploring Utilities Chapter 5

Essential Skills for Bioinformatics: Unix/Linux

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011)

Lecture 3. Essential skills for bioinformatics: Unix/Linux

Introduction to Linux

Name: Peter Lemieszewski Venue: Education

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

Basic Shell Commands

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

Lab Week02 - Part I. Shell Commands. Professional Training Academy Linux Series

Linux Refresher (1) 310/ Fourth Workshop on Distributed Laboratory Instrumentation Systems (30 October - 24 November 2006)

Communications Library Manual

Introduction to UNIX command-line

HEP Computing Part I Very short intro to UNIX/LINUX Marcella Bona

Introduction To Linux. Rob Thomas - ACRC

UNIX files searching, and other interrogation techniques

Introduction to the shell Part II

Introduction to Unix. University of Massachusetts Medical School. October, 2014

Research. We make it happen. Unix Basics. User Support Group help-line: personal:

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Using LSF with Condor Checkpointing

Introduction to Unix: Fundamental Commands

Performing Maintenance Operations

File Commands. Objectives

Files

Linux Reference Card - Command Summary

RTI Secure WAN Transport. Installation Guide

Computer Architecture Lab 1 (Starting with Linux)

Unix Essentials. BaRC Hot Topics Bioinformatics and Research Computing Whitehead Institute October 12 th

CS 307: UNIX PROGRAMMING ENVIRONMENT WORKING WITH FILES AND COLLECTIONS OF FILES

Lecture 4. Log into Linux Reminder: Homework 1 due today, 4:30pm Homework 2 out, due next Tuesday Project 1 out, due next Thursday Questions?

Archives. Gather and compress Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

Linux command line basics II: downloading data and controlling files. Yanbin Yin

CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND

UNIX Quick Reference

Introduction. File System. Note. Achtung!

IT 341: Introduction to System Administration. Notes for Project #8: Backing Up Files with rsync

Package management rpm Package management with yum The tar tool

List of Linux Commands in an IPm

UNIX. Basic UNIX Command


Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

commandname flags arguments

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

Cloud Computing and Unix: An Introduction. Dr. Sophie Shaw University of Aberdeen, UK

Using vrealize Log Insight Importer. April 12, 2018 vrealize Log Insight 4.6

Common UNIX Utilities Alphabetical List

Linux Nuts and Bolts

Unix/Linux Primer. Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

Cloud Computing and Unix: An Introduction. Dr. Sophie Shaw University of Aberdeen, UK

CS Unix Tools. Fall 2010 Lecture 8. Hussam Abu-Libdeh based on slides by David Slater. September 24, 2010

Kurt Schmidt. October 12, 2018

Unix unzip zip compress uncompress zip zip zip zip Extracting zip Unzip ZIP Unix Unix zip extracting ZIP zip zip unzip zip unzip zip Unix zipped

RTI Secure WAN Transport. Installation Guide Version 6.0.0

CS Unix Tools & Scripting

find Command as Admin Security Tool

5/8/2012. Creating and Changing Directories Chapter 7

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Introduction to UNIX command-line II

CSE 390a Lecture 6. bash scripting continued; remote X windows; unix tidbits

Backup using Quantum vmpro with Symantec Backup Exec release 2012

Aliases are set manually or in a login script. Aliases that were set manually will be gone the next time you login.

for more :-

Upgrading Your CSS Software

Transcription:

Lecture Session: Shell Programming Topic: Additional Commands Daniel Chang

diff [-b][-i][-w] filename1 filename2 diff [-b][-i][-w] filename1 directory1 diff [-b][-i][-w][-r] directory1 directory2 Description: Compares two text files and prints the lines in which the files differ. [-b] - Treats groups of spaces as one [-i] - Ignores case [-r] - Includes directories in comparison [-w] - Ignores all spaces and tabs filename1 - Specifies one file to compare filename2 - Specifies other file to compare Directory1 - Specifies one directory to compare Directory2 - Specifies other directory to compare diff ~smithj/hw1.cpp ~smithk/hw1.cpp cmp onefile anotherfile Description: Compares two files and tells you the line numbers for where they differ. Used more for binary and executable files than text files. onefile - Single File name anotherfile - Single File name cmp bashv1 bashv2

file name Description: Tells you whether "name" is an ordinary file or directory. name - file or directory name > file public_html > public_html: directory grep [-i] [-l] [-n][-v] text filename Description: Finds characters or lines of text in one or more files and displays the information to the screen. [-i] - ignores case [-l] - Displays only names of files not actual lines. [-n] - Displays the line numbers [-v] - Look for lines that don't have text text - word or phrase that contains text you want to search for. If there are spaces or things that confuse UNIX enclose them in quotation marks. Actually a "regular expression", which can be very complex filename - File(s) you want to search. grep -i "linkin park" * alias finger "ypcat passwd grep -I" finger dchang

find directories [name filename] [-user username] [-atime +days] [-mtime +days] [ - print] [-exec command {} \:][ok command {}\;] Description: Finds one or more files, based upon rules you give, and then allows you to execute a command on those files. Totally cryptic. directories - list of directories you want to search name filename - file(s) you want to search for user username - user who owns the files atime +days - Files that have not been accessed in +days. A minus sign instead of a + sign you get the files that were looked within those number of days. mtime +days - Files that have not been modified in those number of days. A minus sign instead of a + signs gets you files that were modified within those number of days. print - Displays names of files. Always use this. exec command {} \; - Runs the command when it finds the files. Puts the found filename inside the {}. Be sure and use the \; as a separator. ok command {}; - Same as exec only it asks before it runs the command. find ~dchang\wishlist -name dvd.txt -exec cat {} \;

compress [-v] filenames Description: Shrinks a file into a compressed file that takes up less space on your disk drive. To get the original back you use uncompress or zcat. It creates a file with the same name but with an extension of.z [-v] - Displays how much the fields are compressed. filenames - files you want to compress compress -v gradebook.cpp gunzip [-c] [-f] [-r][-v] filename(s) Description: Restores a gzipped file to its normal size. The gunzip command also restores files compressed with the compress or pack commands. gunzip assumes the files have an extension of.gz [-c] - sends to standard output [-f] - forces uncompression even if file exists. [-r] - Recursive into descending directories [-v] - displays how much space is being expanded filename(s) - File(s) to be uncompressed gunzip -rv facts

tar [-c x][-v][-f][-z] archive.tar [filename]+ Description: Archive or unarchive files, typically with an extension of.tar [-c] - create a new archive (adding files into it) [-x] - extract files from an archive [-v] - verbose (lists files processed) [-f] - use archive file (you will never want to do otherwise) [-t] - list contents of an archive [-z] - will gzip/gunzip if necessary ("gzip" used as filter) archive.tar - archive file to extract from, or to be created filename - files to be added if creating archive tar -cvf assign1.tar main.cpp lib.cpp (create archive from files "main.cpp", "lib.cpp") tar -xvf projectfiles.tar tar -xvzf usetheseflagsalways.tar.gz