UNIX. find command ● The find command is used to locate files on a Unix or Linux system. find will search any set of directories you specify for files.

Slides:



Advertisements
Similar presentations
BACKUPS Whenever a crash occurs we run a backup program. The backup device can be magnetic or a cartridge tape, a floppy diskette or even a disk file.
Advertisements

การใช้ระบบปฏิบัติการ UNIX พื้นฐาน บทที่ 4 File Manipulation วิบูลย์ วราสิทธิชัย นักวิชาการคอมพิวเตอร์ ศูนย์คอมพิวเตอร์ ม. สงขลานครินทร์ เวอร์ชั่น 1 วันที่
LINUX System : Lecture 3 (English-Only Lecture) Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University Acknowledgement.
Linux Workshop Session 1 Khadka, Santosh and Panthi, Sanjeeb Computer Science Department Lamar Univers Lamar Univers ity.
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 27 th, 2009 Essential Unix Commands.
Chin-Chih Chang CS 497C – Introduction to UNIX Lecture 28: - Filters Using Regular Expressions – grep and sed Chin-Chih Chang
Now, return to the Unix Unix shells: Subshells--- Variable---1. Local 2. Environmental.
Introduction to Unix – CS 21 Lecture 13. Lecture Overview Finding files and programs which whereis find xargs Putting it all together for some complex.
Linux Commands LINUX COMMANDS.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
MCB Lecture #3 Sept 2/14 Intro to UNIX terminal.
BILKENT UNIVERSITY DEPARTMENT OF COMPUTER TECHNOLOGY AND INFORMATION SYSTEMS CTIS156 INFORMATION TECHNOLOGIES II CHAPTER 10: ADVANCED FILE PROCESSING.
Brief introduction to UNIX A. Emerson CINECA, High Performance Systems.
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.
(c) Faisal Akkawi & Munki Lee 2001Basic UNIX Commands1 Faisal Akkawi Department of Computer Science Illinois Institute of Technology.
1 Intro to Linux - getting around HPC systems Himanshu Chhetri.
June 1, 1999Manipulating Files1 Introduction to UNIX E. Manipulating Files.
Lesson 11-Locating, Printing, and Archiving User Files.
Unix programming Term: III B.Tech II semester Unit-II PPT Slides Text Books: (1)unix the ultimate guide by Sumitabha Das (2)Advanced programming.
Dedan Githae, BecA-ILRI Hub Introduction to Linux / UNIX OS MARI eBioKit Workshop; Nov , 2014.
Linux Operations and Administration
The Shell Chapter 7. Overview The Command Line Standard IO Redirection Pipes Running a Program in the Background Killing (a process!)
CIS 90 - Lesson 15 Lesson Module Status Slides – Properties - Flash cards – No-stress quiz – Web calendar summary – Web book pages – Commands – Lab – done.
Find Find basics. find ~ -name myfile –print find directory criteria This will search the home directory (~) looking for files.
1 Lecture 5 Additional useful commands COP 3353 Introduction to UNIX.
Workbook 5 - Part 2 The Linux Filesystem RH030 Linux Computing Essentials.
Additional UNIX Commands. 222 Lecture Overview  Multiple commands and job control  More useful UNIX utilities.
Introduction to Bash Programming Ellen Zhang. Previous three classes What have we learnt so far ?
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 Unit 10 Linux.
L&T Infotech1 UNIX – Getting Started - Aneesh Ramani.
Introduction to Linux Instructor: Bennett M. Tanyag PART – 3 Unit 1.
CSC414 “Introduction to UNIX/ Linux” Lecture 5. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: which, passwd, date, ps / kill Working with Files: file, touch, cat, more, less, grep,
Linux Lecture #02. File Related Commands cat --Concatenate and print (display) the content of files. --Also used to create a new file. Syntax cat [Options]
Linux Commands C151 Multi-User Operating Systems.
– Introduction to the Shell 1/21/2016 Introduction to the Shell – Session Introduction to the Shell – Session 3 · Job control · Start,
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Feb 3 rd, 2009 Essential Unix Commands …the second half.
Basic Unix Commands. Listing files and directories ● ls:command is used to list the files and ● directories in present working directory ● ls command.
Lecture 1: Introduction, Basic UNIX Advanced Programming Techniques.
FILTERS USING REGULAR EXPRESSIONS – grep and sed.
UNIX-21 WEEK 2 4/5/2005. UNIX-22 TOPICS Functions (contd.) pushd, popd, dirs Debugging Shell scripts Scheduling Unix jobs Job Management.
Learning Unix/Linux Based on slides from: Eric Bishop.
Tutorial 2.11
UNIX  Portable (common to many computer architectures), multitasking, multi-user operating system  Introduced by Bell labs in mid-1960’s  Thus, much.
Linux 101: Managing Jobs, Schedules, and Backups Purdue Linux Users Group Speaker: Thor Smith.
Linux 201 Training Module Linux Adv File Mgmt.
Read the relevant material in Sobell!
Lesson 5-Exploring Utilities
LINUX LANGUAGE MULTIPLE CHOICE QUESTION SET-5
Advanced File Processing
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
The UNIX Shell Learning Objectives:
Some Linux Commands.
C151 Multi-User Operating Systems
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands:
INTRODUCTION TO UNIX: The Shell Command Interface
Basic UNIX OLC Training.
The Linux Command Line Chapter 10
The Linux Command Line Chapter 18
Lecture 5 Additional useful commands COP 3353 Introduction to UNIX 1.
UNIX Reference Sheets CSE 2031 Fall 2010.
Chin-Chih Chang CS 497C – Introduction to UNIX Lecture 28: - Filters Using Regular Expressions – grep and sed Chin-Chih Chang
Tutorial Unix Command & Makefile CIS 5027
Prepared by, Mr. Satish Pise
Linux Commands LINUX COMMANDS.
Lecture 5 Additional useful commands COP 3353 Introduction to UNIX 1.
CMPSC 60: Week 5 Discussion
Presentation transcript:

UNIX

find command ● The find command is used to locate files on a Unix or Linux system. find will search any set of directories you specify for files that match the supplied search criteria ● Syntax: find where-to-lookup criteria/filename ● Wild cards: find /tmp fi*

find command ● We can use this command to find out files which were modified in last 10 minutes ● find. -mmin -10 ● The above lists all the files in current directory which were ● modified 10 minutes back ● find. -mtime 0 # find files modified between now and 1 day ago # (i.e., within the past 24 hours) ● find. -mtime -1 # find files modified less than 1 day ago

find command find. -name '*' -size +1M In the above example the system would search for any file that is larger then 1MB. ● find. ● will display the path names of all files in the current directory and all sub directories.

Processes ● A process is a program in execution. Every time you invoke a system utility or an application program from a shell, one or more "child" processes are created by the shell in response to your command. All UNIX processes are identified by a unique process identifier or PID. ● We have one command to display current running processes ● ps ● Options: ps -all ● ps -ef

kill command ● kill command is used to terminate a running ● process ● kill -9 PID ● PID: Process ID

wc command ● wc command is used to count how many lines, words, and characters there are in a file ● syntax :wc filename

tar command ● Create Tape ARchives (TAR) and add or extract files. ● Options: tar [options] filename.tar filename ● ● Creating a tar file: ● tar -cvf file.tar file ● Extracting the files from a tar file: ● tar -xvf file.tar

Compress a file/directory ● tar -zcvf archive-name.tar.gz directory-name ● Where, ● -z: Compress archive using gzip program ● -c: Create archive ● -v: Verbose i.e display progress while creating archive ● -f: Archive File name ● tar -zxvf archive-name.tar.gz ● -x :Extract files

gzip command ● gzip reduces the size of the files ● To compress a file with gzip, pass the filename as an argument : ● gzip file.txt ● To uncompress, use gunzip: ● gunzip file.txt.gz ● or ● gzip -d file.txt.gz

grep command ● The grep command allows you to search one file or multiple files for lines that contain a pattern. ● Grep “string” filename ● If any match found it displays “string”. ● If not it wont display any thing ● Case insensitive search using grep -i ● Syntax: grep -i "string" FILE

uname ● uname: command is used display operating system information ● it gives name,version and 32 bit/64bit of the operating system ● x86_64 when it is an kernel 64 bits ● i686 for 32 bits kernel

Questions???

Thank You