Difference between revisions of "Tutorial3: Advanced File Management / Quoting Special Characters"

From CDOT Wiki
Jump to: navigation, search
(Pathname Types)
(Pathname Types)
Line 58: Line 58:
 
It is important to understand file pathnames since you need to '''save or access a file without ambiguity''' because there may be several files by that name in various directories. For example: Accessing the '''cars.txt''' file - which file to access? It depends on the location of the file
 
It is important to understand file pathnames since you need to '''save or access a file without ambiguity''' because there may be several files by that name in various directories. For example: Accessing the '''cars.txt''' file - which file to access? It depends on the location of the file
  
'''/home/userid/uli101/cars.txt
+
:'''/home/userid/uli101/cars.txt'''
/public/uli101/samples/cars.txt
+
:'''/public/uli101/samples/cars.txt'''
/etc/data/cars.txt'''
+
:'''/etc/data/cars.txt'''
  
 
====Absolute / Relative / Relative-To-Home Pathnames====
 
====Absolute / Relative / Relative-To-Home Pathnames====

Revision as of 09:56, 13 January 2020

ADVANCED UNIX / LINUX FILE MANAGEMENT

Main Objectives of this Practice Tutorial

  • Understand the difference between absolute / relative / relative-to-home pathnames
  • Become productive using various pathname types for Unix/Linux File Management
  • Understand the following Ambiguous Filename expansion (FNE) Symbols: * / ? / [ ] / [! ]
  • Become productive using FNE for Unix/Linux File Management
  • Understanding quotation symbols: Backslash \ , single quotes ' ' , double quotes " "
  • Understand the purpose of quoting special characters for File Management and issuing Linux commands


Tutorial Reference Material

Course Notes
Pathname Type / Filename Expansion / Quoting Reference
YouTube Videos
Course Notes:


Pathname Types

Ambiguous Filename Expansion Symbols

  • Asterisk * , Question ? ,
    Character Class [ ] and [! ]


Quotation Symbols Instructional Videos:
  • Using Pathname Types
  • Filename Expansion
  • Quoting Special Characters

Pathname Types

A pathname is a fully-specified location of a unique filename within the file system.

The concept of a pathname relates to every operating system including Unix, Linux, MS-DOS, MS-Windows, Apple-Macintosh, etc.


It is important to understand file pathnames since you need to save or access a file without ambiguity because there may be several files by that name in various directories. For example: Accessing the cars.txt file - which file to access? It depends on the location of the file

/home/userid/uli101/cars.txt
/public/uli101/samples/cars.txt
/etc/data/cars.txt

Absolute / Relative / Relative-To-Home Pathnames

x

Ambiguous Filename Expansion=

x

Quoting Special Characters

x

INVESTIGATION 1: ABSOLUTE / RELATIVE / RELATIVE-TO-HOME PATHNAMES

X


Perform the Following Steps:


  1. X


INVESTIGATION 2: FILENAME EXPANSION

x

Perform the following steps:
  1. X

INVESTIGATION 3: QUOTING SPECIAL CHARACTERS

x


Perform the Following Steps:
  1. X



LINUX PRACTICE QUESTIONS

The purpose of this section is to obtain extra practice to help with your assignment #1, quizzes, your midterm, and your final ezam.

Here is a link to the MS Word Document of ALL of the questions displayed below but with extra room to answer on the document to simulate a quiz:

https://ict.senecacollege.ca/~murray.saul/uli101/uli101_week3_practice.docx

Your instructor may take-up these questions during class. It is up to the student to attend classes in order to obtain the answers to the following questions. Your instructor will NOT provide these answers in any other form (eg. e-mail, etc).


Review Questions:

  1. X
  2. X
  3. X
  4. X
  5. X
  6. X
  7. X
  8. X