SlideShare a Scribd company logo
Topic : Linux Files, Directories and Basic Commands
(Part- 2)
The pwd command is used to display
the location of the current working
directory.
Syntax:
pwd
Linux Files, Directories and Basic Commands
1. pwd
The touch command is used to
create empty files.
Syntax:
touch <filename>
We can create multiple empty files
by executing it once as shown in
figure:
touch demo3.txt demo4.txt
Linux Files, Directories and Basic Commands
2. touch
The finger command is a user
information lookup command which
gives details of all the users logged in.
It provides details like login name,
user name, idle time, login time, and in
some cases their email address even.
Syntax:
$ finger <username>
Example: $finger tempusr gives all the
details of tempusr as shown in figure.
Linux Files, Directories and Basic Commands
3. finger
The passwd command is used to
create and change the password for a
user.
Syntax:
sudo passwd <username>
Here we changed the password of
tempusr as shown in figure.
Linux Files, Directories and Basic Commands
4. passwd
The date command is used to display
date, time, time zone, and more.
Syntax:
$ date
Linux Files, Directories and Basic Commands
5. date
The head command is used to display the
content of a file. It displays the first 10 lines
of a file.
Syntax:
head <filename>
Here in the figure, the cat command shows all
the content of the demo2.txt file whereas the
head command shows only the first 10 lines.
Linux Files, Directories and Basic Commands
6. head
The tail command is used to display the
content of a file same as the head command.
It displays the last 10 lines of a file.
Syntax:
tail <filename>
Here in the figure, the cat command shows all
the content of the demo2.txt file whereas the
tail command shows only the last 10 lines.
Linux Files, Directories and Basic Commands
7. tail
The cut command is used to select a specific
column of a file.
Syntax:
cut -d(delimiter) - f(columnNumber) <fileName>
Here,
• -d is used as a delimiter which can be a
space, slash, hyphen, or anything else.
• -f is used to specify the column number.
As shown in the figure with the delimiter as a
hyphen (-) and column number 2, we got the
desired output.
Linux Files, Directories and Basic Commands
8. cut
The sort command is used to sort files
in alphabetical order.
Syntax:
sort <file name>
Here as shown in figure , sort
command sorts all the contents of
demo.txt in alphabetical order.
Linux Files, Directories and Basic Commands
9. sort
The 'grep' stands for "global regular expression
print." It is useful for searching the content from a
file.
Syntax:
command | grep <searchWord>
As shown in the figure when we search for 5 using
the command $ cat demo.txt | grep 5 in the
demo.txt file it gives the desired output.
Linux Files, Directories and Basic Commands
10. grep
ThankYou!!!

More Related Content

PPT
Linux commands
PPTX
Lab 3 -Linux Files, Directories and Basic Commands.pptx
PPT
linux-lecture4.ppt
PPT
Linux commands and file structure
PDF
Basic linux commands
PPT
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
PPTX
Presentation for RHCE in linux
PPTX
various shell commands in unix operating system.pptx
Linux commands
Lab 3 -Linux Files, Directories and Basic Commands.pptx
linux-lecture4.ppt
Linux commands and file structure
Basic linux commands
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
Presentation for RHCE in linux
various shell commands in unix operating system.pptx

Similar to Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptx (20)

PPTX
TERMINAL COMMANDS IN LINUX TERMINAL USED TO INTERACT WITH SYSTEM
PDF
Access Linux File System in RHEL - RHCSA (RH124).pdf
PDF
LinuxCommands (1).pdf
PPTX
Using linux in schools
PDF
Linux intro 2 basic terminal
PDF
Module 02 Using Linux Command Shell
PPTX
Linux week 2
PDF
Information about linux operating system
PPTX
Linux commands
PPTX
Linux Command.pptx
PPTX
Unix Trainning Doc.pptx
PPTX
Linux Commands all presentation file .pptx
PPT
3. intro
PPTX
Basic Linux Commands and implementation with Examples
PPTX
Basic Linux Commands with syntax and functions
PPT
8.1.intro unix
PDF
linux commands.pdf
PDF
Basic commands
PDF
Basic linux commands
PPTX
Linux commands presentation topic discrete structure.ppt
TERMINAL COMMANDS IN LINUX TERMINAL USED TO INTERACT WITH SYSTEM
Access Linux File System in RHEL - RHCSA (RH124).pdf
LinuxCommands (1).pdf
Using linux in schools
Linux intro 2 basic terminal
Module 02 Using Linux Command Shell
Linux week 2
Information about linux operating system
Linux commands
Linux Command.pptx
Unix Trainning Doc.pptx
Linux Commands all presentation file .pptx
3. intro
Basic Linux Commands and implementation with Examples
Basic Linux Commands with syntax and functions
8.1.intro unix
linux commands.pdf
Basic commands
Basic linux commands
Linux commands presentation topic discrete structure.ppt
Ad

More from Ciceer Ghimirey (7)

PPTX
Classification-Support Vector Machines.pptx
PPTX
Machine Vision Concepts ,Application & Components.pptx
PPTX
Lab 5 Linux File Structure and Hierarchy.pptx
PPTX
Install Linux OS in Virtual Box.pptx
PPTX
Install LAMP Stack in Linux Server OS and Hosting a Custom Domain .pptx
PPTX
Complete WordPress Setup (Description about Themes & Plugins Added)
PPTX
WordPress Introduction and WordPress Theme Installation Slides
Classification-Support Vector Machines.pptx
Machine Vision Concepts ,Application & Components.pptx
Lab 5 Linux File Structure and Hierarchy.pptx
Install Linux OS in Virtual Box.pptx
Install LAMP Stack in Linux Server OS and Hosting a Custom Domain .pptx
Complete WordPress Setup (Description about Themes & Plugins Added)
WordPress Introduction and WordPress Theme Installation Slides
Ad

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Approach and Philosophy of On baking technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
KodekX | Application Modernization Development
PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Machine learning based COVID-19 study performance prediction
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation_ Review paper, used for researhc scholars
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Network Security Unit 5.pdf for BCA BBA.
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Diabetes mellitus diagnosis method based random forest with bat algorithm
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KodekX | Application Modernization Development
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Big Data Technologies - Introduction.pptx
Unlocking AI with Model Context Protocol (MCP)
Machine learning based COVID-19 study performance prediction

Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptx

  • 1. Topic : Linux Files, Directories and Basic Commands (Part- 2)
  • 2. The pwd command is used to display the location of the current working directory. Syntax: pwd Linux Files, Directories and Basic Commands 1. pwd
  • 3. The touch command is used to create empty files. Syntax: touch <filename> We can create multiple empty files by executing it once as shown in figure: touch demo3.txt demo4.txt Linux Files, Directories and Basic Commands 2. touch
  • 4. The finger command is a user information lookup command which gives details of all the users logged in. It provides details like login name, user name, idle time, login time, and in some cases their email address even. Syntax: $ finger <username> Example: $finger tempusr gives all the details of tempusr as shown in figure. Linux Files, Directories and Basic Commands 3. finger
  • 5. The passwd command is used to create and change the password for a user. Syntax: sudo passwd <username> Here we changed the password of tempusr as shown in figure. Linux Files, Directories and Basic Commands 4. passwd
  • 6. The date command is used to display date, time, time zone, and more. Syntax: $ date Linux Files, Directories and Basic Commands 5. date
  • 7. The head command is used to display the content of a file. It displays the first 10 lines of a file. Syntax: head <filename> Here in the figure, the cat command shows all the content of the demo2.txt file whereas the head command shows only the first 10 lines. Linux Files, Directories and Basic Commands 6. head
  • 8. The tail command is used to display the content of a file same as the head command. It displays the last 10 lines of a file. Syntax: tail <filename> Here in the figure, the cat command shows all the content of the demo2.txt file whereas the tail command shows only the last 10 lines. Linux Files, Directories and Basic Commands 7. tail
  • 9. The cut command is used to select a specific column of a file. Syntax: cut -d(delimiter) - f(columnNumber) <fileName> Here, • -d is used as a delimiter which can be a space, slash, hyphen, or anything else. • -f is used to specify the column number. As shown in the figure with the delimiter as a hyphen (-) and column number 2, we got the desired output. Linux Files, Directories and Basic Commands 8. cut
  • 10. The sort command is used to sort files in alphabetical order. Syntax: sort <file name> Here as shown in figure , sort command sorts all the contents of demo.txt in alphabetical order. Linux Files, Directories and Basic Commands 9. sort
  • 11. The 'grep' stands for "global regular expression print." It is useful for searching the content from a file. Syntax: command | grep <searchWord> As shown in the figure when we search for 5 using the command $ cat demo.txt | grep 5 in the demo.txt file it gives the desired output. Linux Files, Directories and Basic Commands 10. grep