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

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
pssafvan97
 
PDF
Access Linux File System in RHEL - RHCSA (RH124).pdf
RHCSA Guru
 
PDF
LinuxCommands (1).pdf
AnkitKushwaha792697
 
PPTX
Using linux in schools
saeed7878
 
PDF
Linux intro 2 basic terminal
Giovanni Marco Dall'Olio
 
PDF
Module 02 Using Linux Command Shell
Tushar B Kute
 
PPTX
Linux week 2
Vinoth Sn
 
PDF
Information about linux operating system
PriyankaMate4
 
PPTX
Linux commands
penetration Tester
 
PPTX
Linux Command.pptx
SaileshB5
 
PPTX
Unix Trainning Doc.pptx
KalpeshRaut7
 
PPTX
Linux Commands all presentation file .pptx
AshutoshPrajapati30
 
PPT
3. intro
Harsh Shrimal
 
PPT
8.1.intro unix
southees
 
PDF
linux commands.pdf
amitkamble79
 
PDF
Basic linux commands
Akkamahadevi Gowda
 
PDF
Basic commands
ambilivava
 
PPTX
Linux commands presentation topic discrete structure.ppt
akshitabansal1815
 
PPTX
Introduction to linux day1
UtpalenduChakrobortt1
 
ODP
Linux commands
Balakumaran Arunachalam
 
TERMINAL COMMANDS IN LINUX TERMINAL USED TO INTERACT WITH SYSTEM
pssafvan97
 
Access Linux File System in RHEL - RHCSA (RH124).pdf
RHCSA Guru
 
LinuxCommands (1).pdf
AnkitKushwaha792697
 
Using linux in schools
saeed7878
 
Linux intro 2 basic terminal
Giovanni Marco Dall'Olio
 
Module 02 Using Linux Command Shell
Tushar B Kute
 
Linux week 2
Vinoth Sn
 
Information about linux operating system
PriyankaMate4
 
Linux commands
penetration Tester
 
Linux Command.pptx
SaileshB5
 
Unix Trainning Doc.pptx
KalpeshRaut7
 
Linux Commands all presentation file .pptx
AshutoshPrajapati30
 
3. intro
Harsh Shrimal
 
8.1.intro unix
southees
 
linux commands.pdf
amitkamble79
 
Basic linux commands
Akkamahadevi Gowda
 
Basic commands
ambilivava
 
Linux commands presentation topic discrete structure.ppt
akshitabansal1815
 
Introduction to linux day1
UtpalenduChakrobortt1
 
Linux commands
Balakumaran Arunachalam
 

More from Ciceer Ghimirey (7)

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

Recently uploaded (20)

PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
July Patch Tuesday
Ivanti
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Python basic programing language for automation
DanialHabibi2
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Ad

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