Isecur1ty training center Presented by : Eng. Mohammad Khreesha.

Slides:



Advertisements
Similar presentations
Working with Files How to create, view, copy, rename and print files.
Advertisements

Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
UNIX Chapter 09 Basic File Processing Mr. Mohammad Smirat.
Linux+ Guide to Linux Certification, Second Edition
Chapter 7 Advanced Directory and File Management.
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.
Basic UNIX © McGraw Hill All rights reserved.
An Introduction to Operating Systems. Definition  An Operating System, or OS, is low-level software that enables a user and higher-level application.
Embedded Programming and Robotics Lesson 13 Basic Linux 1.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
© 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.
V Avon High School Tech Crew Agenda Old Business –Delete Files New Business –Week 9 Topics: Coming up: –Yearbook Picture: Feb 7 12:20PM.
Working with Files Chapter 5. Display a Calendar Display a calendar for a specific month – cal Display a calendar for a specific year – cal 2000.
Fall 2011 Nassau Community College ITE153 – Operating Systems 1 Session 4 More Hands-on Commands.
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
Guide To UNIX Using Linux Fourth Edition
Linux+ Guide to Linux Certification, Second Edition
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
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.
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.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
Chapter 1 : The Linux System Part 2 Lecture 2 11/14/
Tera Term Brian Smith Chris Vasse Zaheemat Adetoro William Newton Tom Presgraves.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: whereis, which, whoami, finger, passwd, cal, date Working with Files: cat, more, less.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
Manipulating Files Refresher. The touch Command touch is used to create a new, empty file. If the file already exists, touch updates the time and date.
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]
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
A gentle introduction to LINUX at the command prompt.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part B Shell Commands Professional Training.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
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.
Basic Unix Commands. Listing files and directories ● ls:command is used to list the files and ● directories in present working directory ● ls command.
EMT 2390L Lecture 3 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Securing Network Resources with NTFS Permissions.
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.
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
Embedded Software Design Week II Linux Intro Linux Kernel.
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.
The Command Prompt Commands are the way to “do things” in Unix
Useful Linux Commands.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands:
CS314 – Section 5 Recitation 1
Command Line Interface for Beginners
LING 408/508: Computational Techniques for Linguists
Operating Systems and Using Linux
ברוכים הבאים למת"ם מבוא לתכנות מערכות
Lab 00 Discussion Linux Basics
Chapter Four UNIX File Processing.
The Linux Command Line Chapter 4
Module 6 Working with Files and Directories
Lab 2: Terminal Basics.
January 26th, 2004 Class Meeting 2
The Linux Command Line Chapter 4
LPI Linux Certification
Presentation transcript:

isecur1ty training center Presented by : Eng. Mohammad Khreesha

 Introduction  file  touch  rm  cp  mv  rename

 In this chapter we learn how to recognize, create, remove, copy and move files using commands like file, touch, rm, cp, mv and rename.  Linux is case sensitive, this means that FILE1 is different from file1, and /etc/hosts is different from /etc/Hosts.  A directory is a special kind of file, but it is still a file. It will become clear that everything on Linux is a file.

 The file utility determines the file type. Linux does not use extensions to determine the file type. Your editor does not care whether a file ends in.TXT or.DOC.  The file command uses a magic file that contains patterns to recognize file types. The magic file is located in /usr/share/file/magic. Type man 5 magic for more information.  It is interesting to point out file -s for special files like those in /dev and /proc.

 Examples:  file pic33.png  file /etc/passwd  file hello.c  file /proc/cpuinfo  file -s /proc/cpuinfo  file /dev/sda  file -s /dev/sda

 Its is an easy way to create a file is with touch.  Examples:  touch file1  touch file2  touch file1.txt  touch file1.c

 When you no longer need a file, use rm to remove it.  Unlike some graphical user interfaces, the command line in general does not have a waste bin or trash can to recover files.  When you use rm to remove a file, the file is gone. Therefore, be careful when removing files!  Examples:  rm file1  rm –i file1  rm –rf dir1

 To copy a file, use cp with a source and a target argument.  If the target is a directory, then the source files are copied to that target directory.

 Examples:  cp FileA FileB  copy FileA and paste it with new name Fileb  cp FileA MyDir/  copy FileA to MyDir directory  cp -r MyDir MyDirB  copy complete directories  cp file1 file2 dir1/file3 dir1/file55 dir2  cp multiple files to directory  cp -i fire water  To prevent cp from overwriting existing files (-i == interactive)  cp -p file* cpp  preserve permissions and time stamps from source files

 Use mv to rename a file or to move the file to another directory.  When you need to rename only one file then mv is the preferred command to use.  Examples:  mv file100 ABC.txt  mv file100 mydir/  mv file100 mydir/ABC.txt

The End