SlideShare a Scribd company logo
EE-332 Operating System
Department of Electrical Engineering | The University of Faisalabad
Zeeshan Iqbal BEE-FA18-022 (Computer)
Title:
Working with files and directories
Objective:
• To learn how to manage the directory structure of the UNIX files system.
• To learn how to use wildcards in UNIX environment.
• Task 1:
Use the gedit the name “lab4.txt” and save it in the following location ~/Desktop at the
command prompt issue the following commands:
$ cd ~/Deskto
$ pwd
$ ls
$ cp lab4.txt lab4_copy.txt
$ cp lab4_copy.txt ~
$ ls ~
$ cp lab4_copy.txt
$cp lab4_copy.txt ~
$ ls ~
$ cp lab4_copy.txt ~
Experiment # 3
Wildcard Matches
* zero or more characters
? exactly one character
[abcde] exactly one character listed
[a-e] exactly one character in the given range
[!abcde] any character that is not listed
[!a-e] any character that is not in the given range
{debian,linux} exactly one entire word in the options given
EE-332 Operating System
Department of Electrical Engineering | The University of Faisalabad
Zeeshan Iqbal BEE-FA18-022 (Computer)
Output:
• Task 2:
We will be using the files “lab4.txt” and “lab4_copy.txt” created in the
previous task.
At the command prompt (i) issue the following commands and (ii) write- down your
observations:
$ cd ~
$ mv ~/Deskto/lab4.txt
$ ls lab*.*
$ ls ~/Desktop
• Task 3 :
We will be using the files “lab4.txt” and “lab4_copy.txt” created in the previous task.
At the command prompt (i) issue the following commands and (ii) write- down your
observations:
$ cd ~
$ mv lab4.txt lab4.txt.new_name
• Task 4 :
Creating empty files At the command prompt (i) issue the following commands and (ii) write
down your observations: $touch moon sun earth
$ ls
EE-332 Operating System
Department of Electrical Engineering | The University of Faisalabad
Zeeshan Iqbal BEE-FA18-022 (Computer)
• Task 5:
At the command prompt (i) issue the following commands and (ii) write-down your
observations:
$ rm moon
$ rm sun earth
$ rm –i lab*.*
• Task 6:
Creatin directories At the command prompt (i) issue the following commands and (ii) write-
down your observations:
$ cd ~
$ mkdir lab4_folder_level_1
$ cd lab4_folder_level_1
$ mkdir lab4_folder_level_2
$ mkdir ./ lab4_folder_level_2/ lab4_folder_level_3
$ pwd
• Task 7:
Removing directories with their contents
$ rm –r lab4_folder_level_1
• Task 8:
At the command prompt (i) issue the following commands and (ii) write-down your
observations:
$ rm *
$ mv *linux*.html dir1
$ less d*.txt
$ rm junk.???
$ ls hda[0-9]
$ ls hda[0-9][0-9]
$ls {hd,sd}[a-c]
$ rm *[!cehg]
EE-332 Operating System
Department of Electrical Engineering | The University of Faisalabad
Zeeshan Iqbal BEE-FA18-022 (Computer)
Output 2--8:

More Related Content

What's hot

Uop pos 433 week 4 file processing commands worksheet new
Uop pos 433 week 4 file processing commands worksheet newUop pos 433 week 4 file processing commands worksheet new
Uop pos 433 week 4 file processing commands worksheet new
ElijahEthaan
 
Introduction of Linux
Introduction of LinuxIntroduction of Linux
Introduction of Linux
Zeeshan Iqbal
 
Course 102: Lecture 4: Using Wild Cards
Course 102: Lecture 4: Using Wild CardsCourse 102: Lecture 4: Using Wild Cards
Course 102: Lecture 4: Using Wild Cards
Ahmed El-Arabawy
 
Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands
Ahmed El-Arabawy
 
Unix files
Unix filesUnix files
Unix files
Sunil Rm
 
intro unix/linux 02
intro unix/linux 02intro unix/linux 02
intro unix/linux 02
duquoi
 
The Bash Love
The Bash LoveThe Bash Love
The Bash Love
ishwon
 
intro unix/linux 07
intro unix/linux 07intro unix/linux 07
intro unix/linux 07
duquoi
 
intro unix/linux 11
intro unix/linux 11intro unix/linux 11
intro unix/linux 11
duquoi
 
Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands
Ahmed El-Arabawy
 
Linux for CS Majors
Linux for CS MajorsLinux for CS Majors
Linux for CS Majors
worr1244
 
Unix Commands
Unix CommandsUnix Commands
Unix Commands
Dr.Ravi
 
intro unix/linux 06
intro unix/linux 06intro unix/linux 06
intro unix/linux 06
duquoi
 
intro unix/linux 09
intro unix/linux 09intro unix/linux 09
intro unix/linux 09
duquoi
 
Static malware analysis sop
Static malware analysis sopStatic malware analysis sop
Static malware analysis sop
Kyle Taylor
 
Productivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformaticsProductivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformatics
BITS
 
File accessing modes in c
File accessing modes in cFile accessing modes in c
File accessing modes in c
manojmanoj218596
 
Malware analysis and forensic analysis of images
Malware analysis and forensic analysis of imagesMalware analysis and forensic analysis of images
Malware analysis and forensic analysis of images
Kyle Taylor
 

What's hot (18)

Uop pos 433 week 4 file processing commands worksheet new
Uop pos 433 week 4 file processing commands worksheet newUop pos 433 week 4 file processing commands worksheet new
Uop pos 433 week 4 file processing commands worksheet new
 
Introduction of Linux
Introduction of LinuxIntroduction of Linux
Introduction of Linux
 
Course 102: Lecture 4: Using Wild Cards
Course 102: Lecture 4: Using Wild CardsCourse 102: Lecture 4: Using Wild Cards
Course 102: Lecture 4: Using Wild Cards
 
Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands
 
Unix files
Unix filesUnix files
Unix files
 
intro unix/linux 02
intro unix/linux 02intro unix/linux 02
intro unix/linux 02
 
The Bash Love
The Bash LoveThe Bash Love
The Bash Love
 
intro unix/linux 07
intro unix/linux 07intro unix/linux 07
intro unix/linux 07
 
intro unix/linux 11
intro unix/linux 11intro unix/linux 11
intro unix/linux 11
 
Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands
 
Linux for CS Majors
Linux for CS MajorsLinux for CS Majors
Linux for CS Majors
 
Unix Commands
Unix CommandsUnix Commands
Unix Commands
 
intro unix/linux 06
intro unix/linux 06intro unix/linux 06
intro unix/linux 06
 
intro unix/linux 09
intro unix/linux 09intro unix/linux 09
intro unix/linux 09
 
Static malware analysis sop
Static malware analysis sopStatic malware analysis sop
Static malware analysis sop
 
Productivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformaticsProductivity tips - Introduction to linux for bioinformatics
Productivity tips - Introduction to linux for bioinformatics
 
File accessing modes in c
File accessing modes in cFile accessing modes in c
File accessing modes in c
 
Malware analysis and forensic analysis of images
Malware analysis and forensic analysis of imagesMalware analysis and forensic analysis of images
Malware analysis and forensic analysis of images
 

Similar to Working with files and directories in Linux

Ch3 gnu make
Ch3 gnu makeCh3 gnu make
Ch3 gnu make
艾鍗科技
 
Basic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualBasic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manual
Kuntal Bhowmick
 
Introduction to base shell scripting
Introduction to base shell scriptingIntroduction to base shell scripting
Introduction to base shell scripting
Zeeshan Iqbal
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
Acácio Oliveira
 
2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx
Priyadarshini648418
 
Introduction to UNIX
Introduction to UNIXIntroduction to UNIX
Types of Linux Shells
Types of Linux Shells Types of Linux Shells
Types of Linux Shells
BIT DURG
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
Raghu nath
 
Chapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsChapter 4 Linux Basic Commands
Chapter 4 Linux Basic Commands
Shankar Mahure
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programming
Priyadarshini648418
 
Basic Linux Commands
Basic Linux CommandsBasic Linux Commands
Basic Linux Commands
BIT DURG
 
Linux_Ch2 Lecture (1).pdf
Linux_Ch2 Lecture (1).pdfLinux_Ch2 Lecture (1).pdf
Linux_Ch2 Lecture (1).pdf
AllinOne746595
 
5.Shell And Environment
5.Shell And Environment5.Shell And Environment
5.Shell And Environment
phanleson
 
BASH Shell Scripting – Part II
BASH Shell Scripting – Part IIBASH Shell Scripting – Part II
BASH Shell Scripting – Part II
Zeeshan Iqbal
 
Shell Scripting crash course.pdf
Shell Scripting crash course.pdfShell Scripting crash course.pdf
Shell Scripting crash course.pdf
harikrishnapolaki
 
Spsl by sasidhar 3 unit
Spsl by sasidhar  3 unitSpsl by sasidhar  3 unit
Spsl by sasidhar 3 unit
Sasidhar Kothuru
 
嵌入式Linux課程-GNU Toolchain
嵌入式Linux課程-GNU Toolchain嵌入式Linux課程-GNU Toolchain
嵌入式Linux課程-GNU Toolchain
艾鍗科技
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
Harikrishnan Ramakrishnan
 
Lnx
LnxLnx
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
meashi
 

Similar to Working with files and directories in Linux (20)

Ch3 gnu make
Ch3 gnu makeCh3 gnu make
Ch3 gnu make
 
Basic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualBasic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manual
 
Introduction to base shell scripting
Introduction to base shell scriptingIntroduction to base shell scripting
Introduction to base shell scripting
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
 
2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx
 
Introduction to UNIX
Introduction to UNIXIntroduction to UNIX
Introduction to UNIX
 
Types of Linux Shells
Types of Linux Shells Types of Linux Shells
Types of Linux Shells
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
 
Chapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsChapter 4 Linux Basic Commands
Chapter 4 Linux Basic Commands
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programming
 
Basic Linux Commands
Basic Linux CommandsBasic Linux Commands
Basic Linux Commands
 
Linux_Ch2 Lecture (1).pdf
Linux_Ch2 Lecture (1).pdfLinux_Ch2 Lecture (1).pdf
Linux_Ch2 Lecture (1).pdf
 
5.Shell And Environment
5.Shell And Environment5.Shell And Environment
5.Shell And Environment
 
BASH Shell Scripting – Part II
BASH Shell Scripting – Part IIBASH Shell Scripting – Part II
BASH Shell Scripting – Part II
 
Shell Scripting crash course.pdf
Shell Scripting crash course.pdfShell Scripting crash course.pdf
Shell Scripting crash course.pdf
 
Spsl by sasidhar 3 unit
Spsl by sasidhar  3 unitSpsl by sasidhar  3 unit
Spsl by sasidhar 3 unit
 
嵌入式Linux課程-GNU Toolchain
嵌入式Linux課程-GNU Toolchain嵌入式Linux課程-GNU Toolchain
嵌入式Linux課程-GNU Toolchain
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Lnx
LnxLnx
Lnx
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
 

More from Zeeshan Iqbal

Bankers Algorithm in Operating System
Bankers Algorithm in Operating SystemBankers Algorithm in Operating System
Bankers Algorithm in Operating System
Zeeshan Iqbal
 
Deadlock Prevention in Operating System
Deadlock Prevention in Operating SystemDeadlock Prevention in Operating System
Deadlock Prevention in Operating System
Zeeshan Iqbal
 
Round Robin Algorithm in Operating System
Round Robin Algorithm in Operating SystemRound Robin Algorithm in Operating System
Round Robin Algorithm in Operating System
Zeeshan Iqbal
 
Shortest job first scheduling
Shortest job first schedulingShortest job first scheduling
Shortest job first scheduling
Zeeshan Iqbal
 
Introduction to shortest job first scheduling
Introduction to shortest job first schedulingIntroduction to shortest job first scheduling
Introduction to shortest job first scheduling
Zeeshan Iqbal
 
Programming Under Unix and Linux
Programming Under Unix and LinuxProgramming Under Unix and Linux
Programming Under Unix and Linux
Zeeshan Iqbal
 
BASH Shell Scripting – Part III &IV
BASH Shell Scripting – Part III &IVBASH Shell Scripting – Part III &IV
BASH Shell Scripting – Part III &IV
Zeeshan Iqbal
 
Introduction to command line interface.
Introduction to command line interface.Introduction to command line interface.
Introduction to command line interface.
Zeeshan Iqbal
 
Pakistan study notes
Pakistan study notesPakistan study notes
Pakistan study notes
Zeeshan Iqbal
 

More from Zeeshan Iqbal (9)

Bankers Algorithm in Operating System
Bankers Algorithm in Operating SystemBankers Algorithm in Operating System
Bankers Algorithm in Operating System
 
Deadlock Prevention in Operating System
Deadlock Prevention in Operating SystemDeadlock Prevention in Operating System
Deadlock Prevention in Operating System
 
Round Robin Algorithm in Operating System
Round Robin Algorithm in Operating SystemRound Robin Algorithm in Operating System
Round Robin Algorithm in Operating System
 
Shortest job first scheduling
Shortest job first schedulingShortest job first scheduling
Shortest job first scheduling
 
Introduction to shortest job first scheduling
Introduction to shortest job first schedulingIntroduction to shortest job first scheduling
Introduction to shortest job first scheduling
 
Programming Under Unix and Linux
Programming Under Unix and LinuxProgramming Under Unix and Linux
Programming Under Unix and Linux
 
BASH Shell Scripting – Part III &IV
BASH Shell Scripting – Part III &IVBASH Shell Scripting – Part III &IV
BASH Shell Scripting – Part III &IV
 
Introduction to command line interface.
Introduction to command line interface.Introduction to command line interface.
Introduction to command line interface.
 
Pakistan study notes
Pakistan study notesPakistan study notes
Pakistan study notes
 

Recently uploaded

ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 

Recently uploaded (20)

ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 

Working with files and directories in Linux

  • 1. EE-332 Operating System Department of Electrical Engineering | The University of Faisalabad Zeeshan Iqbal BEE-FA18-022 (Computer) Title: Working with files and directories Objective: • To learn how to manage the directory structure of the UNIX files system. • To learn how to use wildcards in UNIX environment. • Task 1: Use the gedit the name “lab4.txt” and save it in the following location ~/Desktop at the command prompt issue the following commands: $ cd ~/Deskto $ pwd $ ls $ cp lab4.txt lab4_copy.txt $ cp lab4_copy.txt ~ $ ls ~ $ cp lab4_copy.txt $cp lab4_copy.txt ~ $ ls ~ $ cp lab4_copy.txt ~ Experiment # 3 Wildcard Matches * zero or more characters ? exactly one character [abcde] exactly one character listed [a-e] exactly one character in the given range [!abcde] any character that is not listed [!a-e] any character that is not in the given range {debian,linux} exactly one entire word in the options given
  • 2. EE-332 Operating System Department of Electrical Engineering | The University of Faisalabad Zeeshan Iqbal BEE-FA18-022 (Computer) Output: • Task 2: We will be using the files “lab4.txt” and “lab4_copy.txt” created in the previous task. At the command prompt (i) issue the following commands and (ii) write- down your observations: $ cd ~ $ mv ~/Deskto/lab4.txt $ ls lab*.* $ ls ~/Desktop • Task 3 : We will be using the files “lab4.txt” and “lab4_copy.txt” created in the previous task. At the command prompt (i) issue the following commands and (ii) write- down your observations: $ cd ~ $ mv lab4.txt lab4.txt.new_name • Task 4 : Creating empty files At the command prompt (i) issue the following commands and (ii) write down your observations: $touch moon sun earth $ ls
  • 3. EE-332 Operating System Department of Electrical Engineering | The University of Faisalabad Zeeshan Iqbal BEE-FA18-022 (Computer) • Task 5: At the command prompt (i) issue the following commands and (ii) write-down your observations: $ rm moon $ rm sun earth $ rm –i lab*.* • Task 6: Creatin directories At the command prompt (i) issue the following commands and (ii) write- down your observations: $ cd ~ $ mkdir lab4_folder_level_1 $ cd lab4_folder_level_1 $ mkdir lab4_folder_level_2 $ mkdir ./ lab4_folder_level_2/ lab4_folder_level_3 $ pwd • Task 7: Removing directories with their contents $ rm –r lab4_folder_level_1 • Task 8: At the command prompt (i) issue the following commands and (ii) write-down your observations: $ rm * $ mv *linux*.html dir1 $ less d*.txt $ rm junk.??? $ ls hda[0-9] $ ls hda[0-9][0-9] $ls {hd,sd}[a-c] $ rm *[!cehg]
  • 4. EE-332 Operating System Department of Electrical Engineering | The University of Faisalabad Zeeshan Iqbal BEE-FA18-022 (Computer) Output 2--8: