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.

Slides:



Advertisements
Similar presentations
The Unix File System. What are the three parts of every file on a Unix filesystem? And where is each stored? Filename - stored in directories Inode -
Advertisements

UNIX file systems Learning Objectives: 1. To understand the basics of file systems 2. To understand the hierarchical structure in Unix file system 3. To.
Exploring the UNIX File System and File Security
Linux+ Guide to Linux Certification, Second Edition
Guide To UNIX Using Linux Third Edition
Unix Basics. Systems Programming: Unix Basics 2 Unix Basics  Unix directories  Important Unix file commands  File and Directory Access Rights through.
UNIX Files and Security Software Tools. Slide 2 File Systems l What is a file system? A means of organizing information on the computer. A file system.
Using Linux Commands Lab 4. Using the Shell in Linux Commands Syntax  Options: could be added to the commands to change their behavior (-a, -la, --help)
Basic UNIX © McGraw Hill All rights reserved.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Learning basic Unix command IT 325 operating system.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
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.
The file structure and related utilities CS240 Computer Science II.
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.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
CHAPTER 1 UNIX FOR NONPROGRAMMERS By U ğ ur Halıcı.
Linux Directory Navigation. File & Directory Commands This is a minimal list of Unix commands that you must know for file management: ls (list) mkdir.
1 Lecture 2 Working with Files and Directories COP 3344 Introduction to UNIX.
Unix Basics Chapter 4.
Linux+ Guide to Linux Certification, Second Edition
The UNIX development environment CS 400/600 – Data Structures.
System Administration Introduction to Unix Session 2 – Fri 02 Nov 2007 Reference:  chapter 1, The Unix Programming Environment, Kernighan & Pike, ISBN.
Chapter Two Exploring the UNIX File System and File Security.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Chapter Two Exploring the UNIX File System and File Security.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: whereis, which, whoami, finger, passwd, cal, date Working with Files: cat, more, less.
E X C E E D I N G E X P E C T A T I O N S Basic LINUX Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Directory structure:
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Using Linux Commands Lab 4. Using the Shell in Linux Commands Syntax  Options: could be added to the commands to change their behavior (-a, -la, --help)
Λειτουργικά Συστήματα – Lab2 Γιάννης Πετράκης. Directory Navigation and Control  The Unix file system is set up like a tree branching out from the root.
Revision: Absolute and relative paths. (root) staffusrbinstudetc ResearchTeachingPrivate pgugitmasters xxxgtrxxx CUA Coursework1.txt CUA xxx02uxxx04u.
2 Manual & Filestore Mauro Jaskelioff. Introduction Using the manual The UNIX filestore File permissions.
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
A gentle introduction to LINUX at the command prompt.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
Basic Unix Commands. Listing files and directories ● ls:command is used to list the files and ● directories in present working directory ● ls command.
UNIX file systems Learning Objectives: 1. To understand the basics of file systems 2. To understand the hierarchical structure in Unix file system 3. To.
The Unix File System R Bigelow. The UNIX File System The file system refers to the way in which UNIX implements files and directories. The UNIX file system.
Learning basic Unix command It 325 operating system.
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 To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Web Programming Essentials:
Lecture 2 Working with Files and Directories
Some Linux Commands.
The Command Prompt Commands are the way to “do things” in Unix
Useful Linux Commands.
CS314 – Section 5 Recitation 1
Eric Shook Department of Geography Kent State University
UNIX Basics Internet Technology.
Tutorial of Unix Command & shell scriptS 5027
Introduction to UNIX.
Tutorial of Unix Command & shell scriptS 5027
Using Linux Commands Lab 3.
Exploring the UNIX File System and File Security
Introduction to Linux Week 0 - Thursday.
Web Programming Essentials:
Tutorial of Unix Command & shell scriptS 5027
Module 6 Working with Files and Directories
What is Unix? A multi-user networked operating system
Lab 2: Terminal Basics.
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
Presentation transcript:

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 options (always proceeded by a – and also called flags) target (such as the file to move or the directory to list) These commands are written on the prompt (terminal command line). Where am I?: pwd Change directory: cd what files and directories are in my current directory: ls If I need to know more about a command: man command

ls ls ls –a ls –l ls –l –t ls -lS lists all files and directories in current working directory ls ls –a ls –l ls –l –t ls -lS lists all files and directories, including hidden files long format time sorted size sorted

permissions links permissions owner group size date filename group change permissions: chmod [u,g,o][+-][r,w,x] filename d - directory - - regular file r … read w … write x … execute drwxrw-rw- user other group

create, copy, delete directories mkdir dir_name rmdir dir_name rm –r dir_name cp –r dir_name dir_copy creates an empty directory named dir_name deletes an empty directory named dir_name deletes a directory named dir_name and its contents copies a directory named dir_name and its contents to a directory named dir_copy

create, copy, remove files touch file_name cp file_name file_copy mv file_name file_copy rm file_name creates an empty file named file_name copies file_name to file_copy renames file_name to file_copy deletes file file_name

change directories cd dir_name cd .. cd cd / cd - changes directory to dir_name goes to parent directory goes to home directory goes to root directory home is the parent directory of students goes to previous directory

absolute/relative paths Pathnames consist of file/directory names, separated by slashes / Any character except / is allowed. Use ''s around weird file names. Extensions are not meaningful to UNIX, only to applications Special file names .file_name . .. Absolute and relative file names - Absolute to the root (start with slash) (e.g. /home/wuchtys/Desktop) - Relative to the current working directory of the process (incl. . and ..) or home directory (e.g. ~/Desktop is equivalent to /home/wuchtys/Desktop)

less typing History history lists recent commands. !<number> redoes that command !<partial> redoes the most recent command that started with <partial> letters Globbing Describe to the shell (not OS) sets of file names with patterns ~ means the home directory ? means any character * means any string (including empty) [<letters>] means any one of the <letters> (except ...), which can also be a range ^ negates some glob expressions File name completion Many shells provide file name completion: Use tab key to expand partial file names