SlideShare a Scribd company logo
File handling and permisions
File Operations in Linux
Creating and Managing Files and Directories
• To create a new directory in Linux, use the mkdir command followed
by the directory name.
mkdir documents
• To create a new file, you can use the touch command.
touch file.txt
• To list files and directories in the current directory, use the ls
command.
ls
• To list files and directories in a specific directory, provide the path as an
argument to ls.
ls /path/to/directory
Copying Files and Directories
• To copy a file, use the cp command followed by the source file and
destination.
cp file.txt /path/to/destination/
• To copy a directory and its contents recursively, use the -r option.
cp -r source_directory/ /path/to/destination/
Moving and Renaming Files and Directories
• To move a file or directory, use the mv command followed by the
source and destination.
mv file.txt /path/to/destination/
• To rename a file or directory, simply use the mv command with the
new name.
mv old_name.txt new_name.txt
Deleting Files and Directories
• To delete a file, use the rm command.
rm file.txt
• To delete an empty directory, use the rmdir command.
rmdir empty_directory/
• To delete a directory and its contents recursively, use the -r option
with rm (be careful with this command, as it deletes files and
directories without confirmation).
rm -r directory_to_delete/
Navigating the Linux File System
• To change the current working directory, use the cd command
followed by the path to the desired directory.
cd /path/to/directory
• To view the current working directory, use the pwd command
Pwd
File Operations in Windows
File Operations in the Windows GUI
(Graphical User Interface)
• Use File Explorer to navigate through files and folders in Windows.
• Right-click on files or folders to access context menu options, such
as "Copy," "Cut," "Paste," "Rename," and "Delete.“
Understanding Common Shortcuts and Right-
click Options
• Common shortcuts in File Explorer:
• Ctrl + C: Copy selected files/folders.
• Ctrl + X: Cut selected files/folders.
• Ctrl + V: Paste copied/cut files/folders.
• F2: Rename selected file/folder.
• Delete: Delete selected file/folder.
Right-click options in File Explorer:
• "Copy": Copy the selected file/folder.
• "Cut": Cut the selected file/folder.
• "Paste": Paste the copied/cut file/folder.
• "Rename": Rename the selected file/folder.
• "Delete": Delete the selected file/folder.
• "Properties": View and modify file/folder properties, including
permissions.
File Permissions and Security in Windows
• In Windows, file permissions are managed using NTFS (New
Technology File System) permissions.
In Windows, file permissions are managed using
NTFS (New Technology File System) permissions
• Right-click on the file or folder, and select "Properties."
• Go to the "Security" tab to view and modify permissions for different
users and groups.
Cross-Platform Considerations
• When working in a mixed Linux and Windows environment, be aware
of file compatibility and conversion issues.
• Pay attention to file naming conventions, character encoding, and
path differences between the two operating systems.
Understanding the -rw-r--r--
• The first character represents the file type: "-" for regular files, "d" for
directories.
• The next three characters represent user permissions, followed by
group permissions, and then others' permissions.
• "r" stands for read, "w" for write, and "x" for execute.
Changing File Permissions
• To change permissions for a file:
chmod permissions filename.txt
• For example, to give read, write, and execute permissions to the user:
chmod u+rwx filename.txt
• To give read and execute permissions to the group: chmod g+rx
filename.txt
• To remove write permission from others:
chmod o-w filename.txt
Setting File Permissions for Users and Groups
• To change the owner of a file:
chown new_owner filename.txt
• To change the group of a file:
chgrp new_group filename.txt
Best Practices for File Security
• Avoid giving unnecessary write permissions to files and directories.
• Use strong passwords and user access controls.
• Regularly update and patch the system and applications to minimize
security vulnerabilities.

More Related Content

Similar to File handling and permisions.pptx

Unix cmc
Unix cmcUnix cmc
Unix cmc
Oussama BENNANI
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
Shashwat Shriparv
 
Linuxnishustud
LinuxnishustudLinuxnishustud
Linuxnishustud
Vicky Singh
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptx
Rajesh Kumar
 
linux-file-system01.ppt
linux-file-system01.pptlinux-file-system01.ppt
linux-file-system01.ppt
MeesanRaza
 
03 browsing the filesystem
03 browsing the filesystem03 browsing the filesystem
03 browsing the filesystem
Shay Cohen
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
Dimas Prasetyo
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
amitkamble79
 
redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
VikrantSChohaan
 
Similarities between linux & windows administration
Similarities between linux & windows administrationSimilarities between linux & windows administration
Similarities between linux & windows administration
Guruprasadgonumakula
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
sbmguys
 
Topic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxTopic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptx
dulala3
 
LINUX_admin_commands.pptx
LINUX_admin_commands.pptxLINUX_admin_commands.pptx
LINUX_admin_commands.pptx
GuhanSenthil2
 
File Management System in Shell Script.pptx
File Management System in Shell Script.pptxFile Management System in Shell Script.pptx
File Management System in Shell Script.pptx
Green University of Bangladesh
 
Linux
LinuxLinux
Linux fundamental - Chap 03 file
Linux fundamental - Chap 03 fileLinux fundamental - Chap 03 file
Linux fundamental - Chap 03 file
Kenny (netman)
 
Group13
Group13Group13
Introduction to linux2
Introduction to linux2Introduction to linux2
Introduction to linux2
Gourav Varma
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
LuigysToro
 
Management file and directory in linux
Management file and directory in linuxManagement file and directory in linux
Management file and directory in linux
Zkre Saleh
 

Similar to File handling and permisions.pptx (20)

Unix cmc
Unix cmcUnix cmc
Unix cmc
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
 
Linuxnishustud
LinuxnishustudLinuxnishustud
Linuxnishustud
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptx
 
linux-file-system01.ppt
linux-file-system01.pptlinux-file-system01.ppt
linux-file-system01.ppt
 
03 browsing the filesystem
03 browsing the filesystem03 browsing the filesystem
03 browsing the filesystem
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
 
redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
 
Similarities between linux & windows administration
Similarities between linux & windows administrationSimilarities between linux & windows administration
Similarities between linux & windows administration
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Topic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxTopic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptx
 
LINUX_admin_commands.pptx
LINUX_admin_commands.pptxLINUX_admin_commands.pptx
LINUX_admin_commands.pptx
 
File Management System in Shell Script.pptx
File Management System in Shell Script.pptxFile Management System in Shell Script.pptx
File Management System in Shell Script.pptx
 
Linux
LinuxLinux
Linux
 
Linux fundamental - Chap 03 file
Linux fundamental - Chap 03 fileLinux fundamental - Chap 03 file
Linux fundamental - Chap 03 file
 
Group13
Group13Group13
Group13
 
Introduction to linux2
Introduction to linux2Introduction to linux2
Introduction to linux2
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
 
Management file and directory in linux
Management file and directory in linuxManagement file and directory in linux
Management file and directory in linux
 

Recently uploaded

一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
nyvan3
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
bopyb
 
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
Vietnam Cotton & Spinning Association
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
nyfuhyz
 
一比一原版多伦多大学毕业证(UofT毕业证书)学历如何办理
一比一原版多伦多大学毕业证(UofT毕业证书)学历如何办理一比一原版多伦多大学毕业证(UofT毕业证书)学历如何办理
一比一原版多伦多大学毕业证(UofT毕业证书)学历如何办理
eoxhsaa
 
writing report business partner b1+ .pdf
writing report business partner b1+ .pdfwriting report business partner b1+ .pdf
writing report business partner b1+ .pdf
VyNguyen709676
 
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
mkkikqvo
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
nuttdpt
 
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
taqyea
 
Building a Quantum Computer Neutral Atom.pdf
Building a Quantum Computer Neutral Atom.pdfBuilding a Quantum Computer Neutral Atom.pdf
Building a Quantum Computer Neutral Atom.pdf
cjimenez2581
 
Sample Devops SRE Product Companies .pdf
Sample Devops SRE  Product Companies .pdfSample Devops SRE  Product Companies .pdf
Sample Devops SRE Product Companies .pdf
Vineet
 
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Kaxil Naik
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
Sachin Paul
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
bmucuha
 
University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
soxrziqu
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
Lars Albertsson
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
Timothy Spann
 
Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
Márton Kodok
 

Recently uploaded (20)

一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
 
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
[VCOSA] Monthly Report - Cotton & Yarn Statistics March 2024
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
 
一比一原版多伦多大学毕业证(UofT毕业证书)学历如何办理
一比一原版多伦多大学毕业证(UofT毕业证书)学历如何办理一比一原版多伦多大学毕业证(UofT毕业证书)学历如何办理
一比一原版多伦多大学毕业证(UofT毕业证书)学历如何办理
 
writing report business partner b1+ .pdf
writing report business partner b1+ .pdfwriting report business partner b1+ .pdf
writing report business partner b1+ .pdf
 
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
 
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(harvard毕业证书)哈佛大学毕业证如何办理
 
Building a Quantum Computer Neutral Atom.pdf
Building a Quantum Computer Neutral Atom.pdfBuilding a Quantum Computer Neutral Atom.pdf
Building a Quantum Computer Neutral Atom.pdf
 
Sample Devops SRE Product Companies .pdf
Sample Devops SRE  Product Companies .pdfSample Devops SRE  Product Companies .pdf
Sample Devops SRE Product Companies .pdf
 
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
 
Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
 

File handling and permisions.pptx

  • 1. File handling and permisions File Operations in Linux
  • 2. Creating and Managing Files and Directories • To create a new directory in Linux, use the mkdir command followed by the directory name. mkdir documents • To create a new file, you can use the touch command. touch file.txt • To list files and directories in the current directory, use the ls command. ls
  • 3. • To list files and directories in a specific directory, provide the path as an argument to ls. ls /path/to/directory
  • 4. Copying Files and Directories • To copy a file, use the cp command followed by the source file and destination. cp file.txt /path/to/destination/ • To copy a directory and its contents recursively, use the -r option. cp -r source_directory/ /path/to/destination/
  • 5. Moving and Renaming Files and Directories • To move a file or directory, use the mv command followed by the source and destination. mv file.txt /path/to/destination/ • To rename a file or directory, simply use the mv command with the new name. mv old_name.txt new_name.txt
  • 6. Deleting Files and Directories • To delete a file, use the rm command. rm file.txt • To delete an empty directory, use the rmdir command. rmdir empty_directory/ • To delete a directory and its contents recursively, use the -r option with rm (be careful with this command, as it deletes files and directories without confirmation). rm -r directory_to_delete/
  • 7. Navigating the Linux File System • To change the current working directory, use the cd command followed by the path to the desired directory. cd /path/to/directory • To view the current working directory, use the pwd command Pwd
  • 9. File Operations in the Windows GUI (Graphical User Interface) • Use File Explorer to navigate through files and folders in Windows. • Right-click on files or folders to access context menu options, such as "Copy," "Cut," "Paste," "Rename," and "Delete.“
  • 10. Understanding Common Shortcuts and Right- click Options • Common shortcuts in File Explorer: • Ctrl + C: Copy selected files/folders. • Ctrl + X: Cut selected files/folders. • Ctrl + V: Paste copied/cut files/folders. • F2: Rename selected file/folder. • Delete: Delete selected file/folder.
  • 11. Right-click options in File Explorer: • "Copy": Copy the selected file/folder. • "Cut": Cut the selected file/folder. • "Paste": Paste the copied/cut file/folder. • "Rename": Rename the selected file/folder. • "Delete": Delete the selected file/folder. • "Properties": View and modify file/folder properties, including permissions.
  • 12. File Permissions and Security in Windows • In Windows, file permissions are managed using NTFS (New Technology File System) permissions.
  • 13. In Windows, file permissions are managed using NTFS (New Technology File System) permissions • Right-click on the file or folder, and select "Properties." • Go to the "Security" tab to view and modify permissions for different users and groups.
  • 14. Cross-Platform Considerations • When working in a mixed Linux and Windows environment, be aware of file compatibility and conversion issues. • Pay attention to file naming conventions, character encoding, and path differences between the two operating systems.
  • 15. Understanding the -rw-r--r-- • The first character represents the file type: "-" for regular files, "d" for directories. • The next three characters represent user permissions, followed by group permissions, and then others' permissions. • "r" stands for read, "w" for write, and "x" for execute.
  • 16. Changing File Permissions • To change permissions for a file: chmod permissions filename.txt • For example, to give read, write, and execute permissions to the user: chmod u+rwx filename.txt • To give read and execute permissions to the group: chmod g+rx filename.txt • To remove write permission from others: chmod o-w filename.txt
  • 17. Setting File Permissions for Users and Groups • To change the owner of a file: chown new_owner filename.txt • To change the group of a file: chgrp new_group filename.txt
  • 18. Best Practices for File Security • Avoid giving unnecessary write permissions to files and directories. • Use strong passwords and user access controls. • Regularly update and patch the system and applications to minimize security vulnerabilities.