SlideShare a Scribd company logo
1 of 15
Topic : Linux Files, Directories and Basic Commands
(Part- 1)
The cd command is used to change
the current directory.
Syntax:
cd <directory name>
cd .. is used to change the directory
one level up in our path.
Linux Files, Directories and Basic Commands
1. cd
The ls command is used to display a
list of the content of a directory.
Syntax:
ls
Linux Files, Directories and Basic Commands
2. ls
The cp command is used to copy a file or
directory.
Syntax:
cp <existing file name> <new file name>
Linux Files, Directories and Basic Commands
3. cp
The rm command is used to remove a
file.
Syntax:
rm <file name>
We can also delete only empty
directories using –d flag, otherwise
we only use rmdir to remove
directories.
Linux Files, Directories and Basic Commands
4. rm
The mkdir command is used to create
a new directory under any directory.
Syntax:
mkdir <directory name>
We can also create multiple directories
as shown in the figure if we name
multiple directories after the mkdir
command.
Linux Files, Directories and Basic Commands
5. mkdir
The rmdir command is used to delete
a directory.
Syntax:
rmdir <directory name>
We can also remove multiple
directories as shown in the figure if we
name multiple directories after the
rmdir command.
Linux Files, Directories and Basic Commands
6. rmdir
The pwd command is used to display
the location of the current working
directory.
Syntax:
pwd
Linux Files, Directories and Basic Commands
7. pwd
file command is used to determine
the type of a file.
Syntax:
file <option> <filename>
Linux Files, Directories and Basic Commands
8. file
The cat command prints the contents
of a specified file in the system’s
output.
Syntax:
cat <file name>
Linux Files, Directories and Basic Commands
9. cat
It works similarly as the cat command but
the more command displays screenful
output at a time in case of larger file (not
the whole content).
Syntax:
more <file name>
In more command, the following keys are used
to scroll the page:
1. ENTER key: To scroll down page by line.
2. Space bar: To move to the next page.
3. b key: To move to the previous page.
4. / key: To search the string.
Linux Files, Directories and Basic Commands
10. more
It works similarly as the more command
with some extra features such as
adjustment in width and height of the
terminal.
Syntax:
less <file name>
We have to press q to quit out of less.
Linux Files, Directories and Basic Commands
11. less
The chmod command is used to change the
access mode of a file.
Syntax:
chmod <options> <mode> <filename>
We can use the chmod command in 2
ways:
1. Symbol Mode:
Example: chmod u+rwx demo.txt
2. Operator Mode:
Example: chmod 755 demo.txt as in
figure.
Linux Files, Directories and Basic Commands
12. chmod
The chown command is used to change a file's
ownership, directory, or symbolic link for a user or
a group.
1. To change the owner:
sudo chown <username> <File name>
Example: sudo chown 1000 demo.txt as in the
figure.
2. To change owner and group:
sudo chown <username/UID> : <Groupname/GID>
<filename>
Example: sudo chown : shishir demo.txt as in figure.
Linux Files, Directories and Basic Commands
13. chown
ThankYou!!!

More Related Content

Similar to Lab 3 -Linux Files, Directories and Basic Commands.pptx

Linux_Commands.pdf
Linux_Commands.pdfLinux_Commands.pdf
Linux_Commands.pdfMarsMox
 
Linux_Commands.pdf
Linux_Commands.pdfLinux_Commands.pdf
Linux_Commands.pdfMarsMox
 
Linux Command.pptx
Linux Command.pptxLinux Command.pptx
Linux Command.pptxSaileshB5
 
Linux Command.pptx
Linux Command.pptxLinux Command.pptx
Linux Command.pptxSaileshB5
 
Linux commands
Linux commandsLinux commands
Linux commandsU.P Police
 
Linux commands
Linux commandsLinux commands
Linux commandsU.P Police
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command ShellTushar B Kute
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command ShellTushar B Kute
 
Chapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsChapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsShankar Mahure
 
Chapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsChapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsShankar Mahure
 
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptx
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptxLab 4 -Linux Files, Directories and Basic Commands Part-2.pptx
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptxCiceer Ghimirey
 
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptx
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptxLab 4 -Linux Files, Directories and Basic Commands Part-2.pptx
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptxCiceer Ghimirey
 

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

Linux_Commands.pdf
Linux_Commands.pdfLinux_Commands.pdf
Linux_Commands.pdf
 
Linux_Commands.pdf
Linux_Commands.pdfLinux_Commands.pdf
Linux_Commands.pdf
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux Command.pptx
Linux Command.pptxLinux Command.pptx
Linux Command.pptx
 
Linux Command.pptx
Linux Command.pptxLinux Command.pptx
Linux Command.pptx
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Introduction to ms dos
Introduction to ms dosIntroduction to ms dos
Introduction to ms dos
 
Introduction to ms dos
Introduction to ms dosIntroduction to ms dos
Introduction to ms dos
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
 
Chapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsChapter 4 Linux Basic Commands
Chapter 4 Linux Basic Commands
 
Chapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsChapter 4 Linux Basic Commands
Chapter 4 Linux Basic Commands
 
LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
 
LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
 
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptx
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptxLab 4 -Linux Files, Directories and Basic Commands Part-2.pptx
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptx
 
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptx
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptxLab 4 -Linux Files, Directories and Basic Commands Part-2.pptx
Lab 4 -Linux Files, Directories and Basic Commands Part-2.pptx
 
Unix_QT.ppsx
Unix_QT.ppsxUnix_QT.ppsx
Unix_QT.ppsx
 
Unix_QT.ppsx
Unix_QT.ppsxUnix_QT.ppsx
Unix_QT.ppsx
 

More from Ciceer Ghimirey

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

More from Ciceer Ghimirey (7)

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

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Lab 3 -Linux Files, Directories and Basic Commands.pptx

  • 1. Topic : Linux Files, Directories and Basic Commands (Part- 1)
  • 2. The cd command is used to change the current directory. Syntax: cd <directory name> cd .. is used to change the directory one level up in our path. Linux Files, Directories and Basic Commands 1. cd
  • 3. The ls command is used to display a list of the content of a directory. Syntax: ls Linux Files, Directories and Basic Commands 2. ls
  • 4. The cp command is used to copy a file or directory. Syntax: cp <existing file name> <new file name> Linux Files, Directories and Basic Commands 3. cp
  • 5. The rm command is used to remove a file. Syntax: rm <file name> We can also delete only empty directories using –d flag, otherwise we only use rmdir to remove directories. Linux Files, Directories and Basic Commands 4. rm
  • 6. The mkdir command is used to create a new directory under any directory. Syntax: mkdir <directory name> We can also create multiple directories as shown in the figure if we name multiple directories after the mkdir command. Linux Files, Directories and Basic Commands 5. mkdir
  • 7. The rmdir command is used to delete a directory. Syntax: rmdir <directory name> We can also remove multiple directories as shown in the figure if we name multiple directories after the rmdir command. Linux Files, Directories and Basic Commands 6. rmdir
  • 8. The pwd command is used to display the location of the current working directory. Syntax: pwd Linux Files, Directories and Basic Commands 7. pwd
  • 9. file command is used to determine the type of a file. Syntax: file <option> <filename> Linux Files, Directories and Basic Commands 8. file
  • 10. The cat command prints the contents of a specified file in the system’s output. Syntax: cat <file name> Linux Files, Directories and Basic Commands 9. cat
  • 11. It works similarly as the cat command but the more command displays screenful output at a time in case of larger file (not the whole content). Syntax: more <file name> In more command, the following keys are used to scroll the page: 1. ENTER key: To scroll down page by line. 2. Space bar: To move to the next page. 3. b key: To move to the previous page. 4. / key: To search the string. Linux Files, Directories and Basic Commands 10. more
  • 12. It works similarly as the more command with some extra features such as adjustment in width and height of the terminal. Syntax: less <file name> We have to press q to quit out of less. Linux Files, Directories and Basic Commands 11. less
  • 13. The chmod command is used to change the access mode of a file. Syntax: chmod <options> <mode> <filename> We can use the chmod command in 2 ways: 1. Symbol Mode: Example: chmod u+rwx demo.txt 2. Operator Mode: Example: chmod 755 demo.txt as in figure. Linux Files, Directories and Basic Commands 12. chmod
  • 14. The chown command is used to change a file's ownership, directory, or symbolic link for a user or a group. 1. To change the owner: sudo chown <username> <File name> Example: sudo chown 1000 demo.txt as in the figure. 2. To change owner and group: sudo chown <username/UID> : <Groupname/GID> <filename> Example: sudo chown : shishir demo.txt as in figure. Linux Files, Directories and Basic Commands 13. chown