File and Folder CLI Commands 12/24/20151. Agenda Overview of OS functions and the SHELL Internal v External Commands Command History Making & Modifying.

Slides:



Advertisements
Similar presentations
DOS commands.
Advertisements

A batch file is a file that contains a number of DOS commands, each of which could be run individually from the command prompt. By putting them into a.
Operating System Type of Operating System
Disk Operating System (DOS)
MCT260-Operating Systems I Operating Systems I Navigating the File System.
© 2007 The McGraw-Hill Companies, Inc. All rights reserved Working with the Command- Line Interface Chapter 14.
MCT260-Operating Systems I Operating Systems I Using Text Editors.
Chapter 5 Accessing Files and Directories. How Directories Get Created OS installation: usr, dev, etc, export, kernel and others places to store installation.
1 Windows Command Line Interface (AKA DOS commands) Prof. Yitzchak Rosenthal.
Command Console Tutorial BCIS 3680 Enterprise Programming.
FILES  A file is a collection of related information  Files are kept in directories on a disk.
Operating System Fundamentals
Command Prompt Chapter 7 Using ATTRIB, SUBST, XCOPY, DOSKEY, and the MS-DOS Text Editor Richard Goldman ©January 31, 2000.
© 2010 The McGraw-Hill Companies, Inc. All rights reserved Mike Meyers’ CompTIA A+ ® Guide to Managing and Troubleshooting PCs Third Edition Working with.
Or CMD/BATCH.  Title this comand makes the cmd prompt’s title whatever you would like it to be.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 1 Third Edition Chapter 4 Disk Operating System (DOS) and the Command-Line Interface McGraw-Hill.
Ch 71 Using ATTRIB, SUBST, XCOPY, DOSKEY, and the Text Editor.
By Umesh ks. Dos is a single user operating system. Its support the all operating system wizards Support the disk scheduling. File management Network.
Ch 51 Internal Commands COPY and TYPE. Ch 52 Overview Will review file-naming rules.
1 DOS 2 Directory structure of disks Directory structure of disks Full Path or Full file specification Full Path or Full file specification Creating directories.
DOS Commands What is a command Types of DOS Commands Basic Terms
Ch 61 Using DEL, REN, MOVE, and RD /S. Ch 62 Overview Will continue to work with internal commands that help manage and manipulate files.
Notes Assignment #1 is due next Friday by 11:59 pm via Test #1 will be held Thursday February 18 at the start of class (one period long) Format:
Using Hard Drives Additional information.  Hierarchical Filing Systems  Why Organize a Hard Disk?  Relative and Absolute Paths  Subdirectory Markers.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
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”
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
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.
The Command Line Interface. The OS files IO.sys MSDOS.sys Command.com IO and MSDOS are hidden files, COMMAND.COM shows in directory listings.
Ch 21 Command Syntax Using the DIR Command with Parameters and Wildcards.
Gene Perkins, Lassen High School Networking Academy
®® Microsoft Windows 7 for Power Users Tutorial 13 Using the Command-Line Environment.
Shell Scripting Introduction. Agenda What is Shell Scripting? Why use Shell Scripting? Writing and Running a Shell Script Basic Commands -ECHO - REM.
Ch 41 Program Files, Data Files, and Subdirectories.
Interacting with a UNIX computer: Navigating through the directory tree.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Some content in this lecture added.
Operating Systems and Using Linux CMSC 104, Lecture 3 John Y. Park 1.
Operating Systems Concepts 1/e Ruth Watson Chapter 3 Chapter 3 DOS Ruth Watson.
Basic MS-DOS. History MS-DOS 1.0 was released in August 1981, and was updated until April 1994 when it was replaced by Windows 95 All versions of windows.
DISK OPERATING System MS-DOS. MS-DOS Microsoft Disk Operating System (MS-DOS) is a single user, single tasking operating system. DOS is a command-line,
Chapter 1 : The Linux System Part 2 Lecture 2 11/14/
Basic MS-DOS.
1.  Microsoft DOS (Disk Operating System) use a command line user interface.command line  A command line user interface means that the user is required.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: whereis, which, whoami, finger, passwd, cal, date Working with Files: cat, more, less.
Ch 91 Pipes, Filters and Redirection. Ch 92 Overview Will use redirection to redirect standard input and standard output.
Linux+ Guide to Linux Certification, Third Edition
Introduction to Programming Using C An Introduction to Operating Systems.
Files, User Interfaces, and the OS Files: programs (.exe); data (.jpg,.html,.doc, etc.) User Interface: used to run programs and manage files and folders.
Operating System Fundamentals 1. Components of an OS 2. Functions of an OS 3. Types of OS 4. Command-line tools.
Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
Copyright © 2007 Heathkit Company, Inc. All Rights Reserved PC Fundamentals Presentation 10 – Using the Command Line.
The Command Line Yep, you need to know this. The Basics Start with the Prompt, what the computer tells you when ready for a command You type a command.
© 2015 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner.
Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 6 Directory Commands.
Operating Systems and Using Linux Courtesy of John Y. Park 1.
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.
Operating System. What is Operating System OS is system software, which may be viewed as collection of software consisting of procedures for operating.
Guide to Parallel Operating Systems with Microsoft Windows XP and Linux Chapter 4 Directory Commands.
IST 222 Day 6. DOS Naming Conventions A filename contains up to 8 characters, a separating period, and a file extension of up to three characters This.
MS-DOS is an acronym for MicroSoft Disk Operating System It is a CUI based operating system. It provides user with a command prompt (generally called.
Fundamentals of Windows Mouse n 4 Basic Operations: –Pointing –Clicking –Double Clicking –Dragging.
Systems Administration (Windows) BIT3111 – Lecture 5 (Introduction to Windows OS)
Yep, you need to know this
INTERNAL COMMANDS CLS(Clear Screen):-
Operating System Fundamentals
Working with the Command- Line Interface
Chapter 6 Using DEL, REN, MOVE, and RD /S Ch 6.
OPERATING SYSTEM B-TECH III YEAR I SEM BRANCH :ECE
1.3 Given a scenario, apply appropriate Microsoft command line tools
Presentation transcript:

File and Folder CLI Commands 12/24/20151

Agenda Overview of OS functions and the SHELL Internal v External Commands Command History Making & Modifying Directories Making & Modifying Files

Overview of OS Functions Application Program Layer Operating System Layer Hardware Layer User Interface (shell) File Management Device Management Task Management

SHELL Application Program Layer Operating System Layer Hardware Layer User Interface (shell) cmd.exe File Management Device Management Task Management OPEN FILE

CLI Syntax Command tells CLI “what” user wants to do Parameter tells CLI “where” user wants the command to happen. (A:) Switch (or Option) tells CLI “how” the user wants the command to be executed C:\>COPY /A /Vmyfile.txt e:\backup\ Switch /A ASCII file /V Verify after copying Parameter 1 Source Parameter 2 Target Command Prompt Drive and path

Internal Commands Internal commands are built into the command interpreter cmd.exe Installed with OS No disk access Faster performance Examples: CD, CHDIR COPY DEL DIR ECHO GOTO REN, RENAME RD, RMDIR SET START TITLE PAUSE

External Commands external commands that are not built into the command interpreter cmd.exe Installed in separate folder Disk Access required Slower performance Examples: TREE MORE HELP IPCONFIG PING ATTRIB XCOPY SORT NET

Command History DOSKEY F7 – to list commands to date F9 – to select command number and place on the command line F3 – to repeat previous command UP Arrow – to scroll previous command F2 – edits previous command line up to the identified character

Directories and File-- CLI

Directories and Files - GUI Same Explorer information, but different views

Directories and Files C:\ IOS110 Lectures Lecture1.txt Lecture1.pps Lab Lab1.htm Lab2.draft.htm Root Child Child\Parent

File Names You can use most characters in a file name although there are some illegal ones: / \ : * ? " | File names can be up to 255 characters and can use upper and lower case, spaces and multiple extensions Win16 programs must use 8.3 rule XP automatically creates a “short file name” or “alias” Long file name (LFN) e.g. The little brown fox.foxx.jan.doc Alias Thelit~1.doc 12/24/201512

Absolute and Relative Paths C:\ IOS110 Lectures Lecture1.txt Lecture1.pps Lab Lab1.htm Lab2.draft.htm Absolute path defines a file or directory from the root Relative path defines a file or directory from the working directory (its position in the directory tree) \IOS110\lab\lab1.htm..\..\lab1.htm

Make a directory (MD, MKDIR) To create or make a directory type md or mkir at the prompt, with the name of the directory For example, to create a file called data, use the command: MD data 12/24/201514

Change Directory (CD,CHDIR) To switch between directories, we use the CD command (chdir will also work). Note: if you use the CD command and misspell the directory or enter a directory that does not exist, you will receive an error message. ”the system cannot find the path specified” To go to the root from anywhere type cd\ To go up one directory (parent) type cd.. To go up 2 levels type cd..\.. 12/24/201515

Remove Directory (RD) To remove an empty directory, the RD command works well. If your directory is not empty though, you need to add the /s switch to delete a “directory tree” 12/24/201516

Practice Create two directories January and February under the root of C:. Create three directories under January: tests, quizzes and labs Create the same three directories under February. Navigate to the c:\February\quizzes directory. How would you get from this directory to the January\tests directory? 12/24/201517

Absolute Pathnames Exercise Create a directory called week2 under the root of C:\ you would type: C:\> MD c:\week2 or C:\> MD \week2 (TRY IT) Once that directory has been created, let’s say you want to create a subdirectory called prac2 in week2. Using absolute pathnames you would type C:\> MD \week2\prac2 (TRY IT) 12/24/201518

Absolute Pathnames Practice Create a directory called cars under the root of C:\ Create the following directories using absolute paths only C:\cars\SUVs C:\cars\compact C:\cars\sports C:\cars\SUVs\escape C:\cars\SUVs\tribute When you are done, run the command TREE \cars For more absolute path information click hereclick here 12/24/201519

Relative Pathnames Instead of working from the root, we work from our current or working directory. For example, if you were in the c:\apps directory and wanted to create a directory called word within the apps directory, you would simple type: MD word 12/24/201520

Relative Pathnames Exercises We have the following directory structure: C:\Apps C:\Apps\word C:\Apps\Ghost Assuming you were in the Apps\Ghost directory and you wanted to create a directory in the root of C:\ called Games. You could type MD..\..\games The..\..\ brings you up two levels back to the root. 12/24/201521

DIR command If you want to see a listing of all of the files and folders in a given directory or even your entire system, then this is the command to use. DIR always lists the contents of your working directory unless you specify a directory such as: DIR c:\2005\January This command will list the contents of the January directory. If you were in the January directory then simply typing the command DIR would also display the contents of the January directory. 12/24/201522

Viewing Text Files If all you want to do is view the contents of a file, then use the TYPE command. TYPE [path to file] will display the contents of the file to the screen However, if file is large it will scroll past very fast. For large files use Type file1.txt | more The “|” pipe symbol is used to filter the output one page at a time More file1.txt file2.txt file3.txt More is a better command but is “external”. It automatically filters input and provides a “submenu” for greater control 12/24/201523

Create a Text File Notepad Edit Copy con Note: remember the path where you saved them!! To help you remember display the full path to the file in the title bar In an Explorer window go to Tools\Folder Options\View and click “Display Full Path in Title Bar”

DEL (Delete) command To delete a file, use the DEL command. You can delete multiple files at once by using wildcards. Remember, use the RD command to remove empty directories 12/24/201525