Introductory linux: processes and dfile management.

Similar documents
Birmingham Environment for Academic Research. Introduction to Linux Quick Reference Guide. Research Computing Team V1.0

Thirty Useful Unix Commands

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

UNIX Tutorial for Beginners

Introduction to Mac OS X

UNIX / Linux commands Basic level. Magali COTTEVIEILLE - September 2009

AN INTRODUCTION TO UNIX

Partek Flow Installation Guide

Fred Hantelmann LINUX. Start-up Guide. A self-contained introduction. With 57 Figures. Springer

Tutorial 0A Programming on the command line

L01 Introduction to the Unix OS

CS 103 Lab Linux and Virtual Machines

Linux command line. An introduction to the Linux command line for genomics. Susan Fairley

Unix Sampler. PEOPLE whoami id who

Unix the Bare Minimum

ICS 351: Today's plan

CPSC 2800 Linux Hands-on Lab #7 on Linux Utilities. Project 7-1

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

Registry Tuner. Software Manual

Local Caching Servers (LCS): User Manual

Workflow Templates Library

Setting up PostgreSQL

Command Line Crash Course For Unix

HP-UX Essentials and Shell Programming Course Summary

DiskPulse DISK CHANGE MONITOR

INASP: Effective Network Management Workshops

EVault for Data Protection Manager. Course 361 Protecting Linux and UNIX with EVault

Linux System Administration. System Administration Tasks

Command-Line Operations : The Shell. Don't fear the command line...

Command Line - Part 1

Introduction to. UNIX Bob Booth December 2004 AP-UNIX2. University of Sheffield

Unix/Linux Forensics 1

CS10110 Introduction to personal computer equipment

Sophos Anti-Virus for Linux configuration guide. Product version: 9

SIOS Protection Suite for Linux v Postfix Recovery Kit Administration Guide

An Introduction to the Linux Command Shell For Beginners

Running your first Linux Program

Introduction to Operating Systems

PuTTY/Cygwin Tutorial. By Ben Meister Written for CS 23, Winter 2007

Hands-On UNIX Exercise:

IT Quick Reference Guides Using Windows 7

ERserver. iseries. Work management

A Crash Course on UNIX

Carry it Easy. User Guide

The BackTrack Successor

Introduction to the UNIX Operating System and Open Windows Desktop Environment

CMSC 216 UNIX tutorial Fall 2010

USEFUL UNIX COMMANDS

1. Installation Instructions - Unix & Linux

Do it Yourself System Administration

VMware Horizon FLEX User Guide

New Lab Intro to KDE Terminal Konsole

Training Day : Linux

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

An A-Z Index of the Apple OS X command line (TERMINAL) The tcsh command shell of Darwin (the open source core of OSX)

CS197U: A Hands on Introduction to Unix

Usage of the mass storage system. K. Rosbach PPS 19-Feb-2008

System Administration

An Introduction to Using the Command Line Interface (CLI) to Work with Files and Directories

Getting Started with Amazon EC2 Management in Eclipse

Using Secure4Audit in an IRIX 6.5 Environment

System Resources. To keep your system in optimum shape, you need to be CHAPTER 16. System-Monitoring Tools IN THIS CHAPTER. Console-Based Monitoring

Sophos Anti-Virus for Linux configuration guide. Product version: 9

Leak Check Version 2.1 for Linux TM

system or read a good Unix book from the DESY library (e.g. Mark Sobell, APractical Guide to

A Computer Glossary. For the New York Farm Viability Institute Computer Training Courses

New User Orientation. Welcome to Brown CS! Fall 2015 Consultants

Installing a Browser Security Certificate for PowerChute Business Edition Agent

MapGuide Open Source Repository Management Back up, restore, and recover your resource repository.

Hypercosm. Studio.

NSS Volume Data Recovery

Sophos Anti-Virus for Linux user manual

How To Backup A Database On A Microsoft Powerpoint 3.5 (Mysqldump) On A Pcode (Mysql) On Your Pcode On A Macbook Or Macbook (Powerpoint) On

University of Pennsylvania Department of Electrical and Systems Engineering Digital Audio Basics

MySQL Backups: From strategy to Implementation

DocuShare Installation Guide

Troubleshooting Citrix MetaFrame Procedures

Installation Guide for FTMS and Node Manager 1.6.0

Attix5 Pro Server Edition

Red Hat Certifications: Red Hat Certified System Administrator (RHCSA)

IUCLID 5 Guidance and support. Installation Guide Distributed Version. Linux - Apache Tomcat - PostgreSQL

LECTURE-7. Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. Topics:

Linux System Administration on Red Hat

Backup and Recovery using PITR Mark Jones EnterpriseDB Corporation. All rights reserved. 1

CIT 470: Advanced Network and System Administration. Topics. Performance Monitoring. Performance Monitoring

Backup of ESXi Virtual Machines using Affa

Unix and Linux. David J. Scott. Department of Statistics, University of Auckland. Unix and Linux p. 1/4

OpenGeo Suite for Linux Release 3.0

TECHNICAL BRIEF. Primary Storage Compression with Storage Foundation 6.0

TOSHIBA GA Printing from Windows

Microsoft Outlook 2007 Introductory guide for staff

Acronis Disk Director 11 Advanced Server. Quick Start Guide

Carry it Easy +Plus Bio. User Guide

Networking Best Practices Guide. Version 6.5

USER MANUAL SlimComputer

UNISOL SysAdmin. SysAdmin helps systems administrators manage their UNIX systems and networks more effectively.

The Windows Command Prompt: Simpler and More Useful Than You Think

Facultat d'informàtica de Barcelona Univ. Politècnica de Catalunya. Administració de Sistemes Operatius. System monitoring

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

Transcription:

Introductory linux: processes and dfile management.

Last time Basic linux commands ls, cd, rm, cp, mv, man, more, less Wildcards Piping and redirecting File permissions

Today Some more linux commands Processes Disk management

Tab completion You can use tab completion to finish commands. For example: fire <TAB> firefox cd /user1/mccau <TAB> cd /user1/mccauley A very useful shortcut t that t can save a lot of typing. Use <cntrl>-d to see a list of possible tab completions.

Keyboard Shortcuts Command Line history. Use the and keys. Edit and move cursor using and Jump around using <cntrl>-a and <cntrl>-e Jump to start and end of line. Can use <cntrl>-k to delete rest of line. Lock screen <cntrl>-s Unlock with <cntrl>-q

Printing To print a file generally you can use lpr Works for text files and postscipt. For PDF files you will need to use a program acroread xpdf To specify a printer lpr Pprinter To check the printer queue lpq To delete a job use lprm

Processes A process is a binary file running on the system These can be anything from KERNEL to web browsers, to editors to your analysis code. A process that t goes bad can bring the system to a halt. Often your analysis code But editors or web browsers etc can do this too.

Ways to monitor processes ps command top List all the processes for the current shell ps u mccauley List all processes for user mccauley Shows all processes and resources Listed in order of CPU usage. Good way to identify rogue processes.

Killing gprocess If its running on your terminal can try <cntrl>c Won t always work Use the kill command Use ps or top to find out the processor id kill pid Switches -15, like control-c -9 really really kill this process.

Background and Foreground Processes Processes can run in the background or foreground. Foreground processes are attached to your terminal. Background processes are not and will continue if the terminal closes (in most cases) To launch a process in the background use & firefox & A foreground process can also be suspended <cntrl>-z use fg or bg to restart in the background or foreground.

Being nice All processes use resources. Resource usage from a prioritised list. Depends on nice level Use nice to set level nice firefox Can renice a process using renice renice 10 pid On a many user platform large jobs should in general be niced to be nice to other users.

Disk Usage Disks and file systems are a finite size. You need to know how much you are using. du df quota How much is in the directory specified? How much space is in the file system specified? How much space am I using relative to my quota?

The du command Useful switches: -k How much space in kb. -m How much space in MB. -s Summary, don t display subdirectories. -h Human readable output. Make use of a pipe du m sort n Sorts subdirectories smallest largest. sort n sorts numerically.

The df command Tells you how much space is left on a filesystem. Reports the fractional usage. Better measurement of system usage for a full file system than du. Reports the space used by the files.

The quota command Often on a filesystem you will have a quota. This is the maximum amount of data you can have on a filesystem. Your quota and how much you ve used can be checked using the quota command. quota v The quota and usage for the current user.

Archiving and Compression gzip --- Compress a file. gzip myfile.txt myfile.txt.gz gunzip --- Uncompress a file. gunzip myfile.txt.gz myfile.txt Use tar to archive files tar cf mytar.tar mydir/* mytar.tar tar xf mytar.tar mydir/* Other switches -v Verify list all files in archive process -t List all files in archive (ls for tar) -z tar followed by gzip (or gunzip) (not on all systems) -u Update, adds files to an archive.

Symbolic Links There are two types of symbolic links. Hardlinks Same filesystem only. Two files point to the same file. ln file1.txt file2.txt Softlinks File2 points to File1. ln s file2.txt file1.txt

What if I m using too much space? Try archiving/compressing some files. Search for large unusable files A good example are core files core.******* Memory dump from a crashing program Search for old data files. Obsolete data files (eg root files) can take up a lot of space. Search for old backup files Eg myfile.txt~ from xemacs. Look for old objects, libraries and executables you don t use. If you ve still got the source code do you need these?

Backed up file systems Sometimes you ll lose a file you need. Accidentally deleted. Disk crashes. Some file systems are backed up, others are not. If you lose a file on a backed up file system it can usually be recovered by the system administrator. On a file system that is not backed up the file is gone for good. Be careful to store important files on systems that are backed up. Check on your local system to see which, but in general your home directory will be safe.

On the hep system Home directories i backed up nightly No same day recovery. Two week grace period. If you don t ask for two weeks the file is gone. Email helpdesk immediately if you need a file recovered. Disk on your desktop is not backed up. Scratch space only.

Scratch space Temporary storage space. Expires after a set time period. Data will be lost. On hep 6TB scratch space To be sent as in transition. 1 week for storage.

Exercises Show me what processes you have running on the server. Determine the disk usage in your home directory Clean up pyour home directory to save space.