SlideShare a Scribd company logo
1 of 18
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

An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
Dimas Prasetyo
 
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

一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理
pyhepag
 
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
acoha1
 
edited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdfedited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdf
great91
 
一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理
cyebo
 
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
dq9vz1isj
 
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
pyhepag
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
pwgnohujw
 
一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理
pyhepag
 
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
acoha1
 

Recently uploaded (20)

Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
 
一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理
 
Aggregations - The Elasticsearch "GROUP BY"
Aggregations - The Elasticsearch "GROUP BY"Aggregations - The Elasticsearch "GROUP BY"
Aggregations - The Elasticsearch "GROUP BY"
 
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
 
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
 
edited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdfedited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdf
 
一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理
 
Atlantic Grupa Case Study (Mintec Data AI)
Atlantic Grupa Case Study (Mintec Data AI)Atlantic Grupa Case Study (Mintec Data AI)
Atlantic Grupa Case Study (Mintec Data AI)
 
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024
 
2024 Q2 Orange County (CA) Tableau User Group Meeting
2024 Q2 Orange County (CA) Tableau User Group Meeting2024 Q2 Orange County (CA) Tableau User Group Meeting
2024 Q2 Orange County (CA) Tableau User Group Meeting
 
NOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam DunksNOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam Dunks
 
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
 
Formulas dax para power bI de microsoft.pdf
Formulas dax para power bI de microsoft.pdfFormulas dax para power bI de microsoft.pdf
Formulas dax para power bI de microsoft.pdf
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
 
Predictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting TechniquesPredictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting Techniques
 
一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理
 
社内勉強会資料  Mamba - A new era or ephemeral
社内勉強会資料   Mamba - A new era or ephemeral社内勉強会資料   Mamba - A new era or ephemeral
社内勉強会資料  Mamba - A new era or ephemeral
 
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
 

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.