Introduction
In this project, you will learn how to copy files larger than 10K from the /etc
directory to the /tmp/etc
directory, preserving the directory structure. This is a useful skill for managing and organizing files on a Linux system.
🎯 Tasks
In this project, you will learn:
- How to create a script to copy files based on size
- How to use the
find
command to locate files that meet specific criteria
- How to preserve the directory structure when copying files
- How to run a script with elevated privileges using
sudo
🏆 Achievements
After completing this project, you will be able to:
- Automate the process of copying files based on size
- Maintain the directory structure when copying files
- Use the
find
command effectively to locate files that meet specific criteria
- Run scripts with elevated privileges to access protected files and directories
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
shell(("`Shell`")) -.-> shell/ControlFlowGroup(["`Control Flow`"])
linux(("`Linux`")) -.-> linux/BasicSystemCommandsGroup(["`Basic System Commands`"])
linux(("`Linux`")) -.-> linux/FileandDirectoryManagementGroup(["`File and Directory Management`"])
linux(("`Linux`")) -.-> linux/BasicFileOperationsGroup(["`Basic File Operations`"])
shell(("`Shell`")) -.-> shell/BasicSyntaxandStructureGroup(["`Basic Syntax and Structure`"])
shell(("`Shell`")) -.-> shell/VariableHandlingGroup(["`Variable Handling`"])
shell/ControlFlowGroup -.-> shell/if_else("`If-Else Statements`")
linux/BasicSystemCommandsGroup -.-> linux/source("`Script Executing`")
linux/BasicSystemCommandsGroup -.-> linux/echo("`Text Display`")
linux/FileandDirectoryManagementGroup -.-> linux/mkdir("`Directory Creating`")
linux/FileandDirectoryManagementGroup -.-> linux/find("`File Searching`")
linux/FileandDirectoryManagementGroup -.-> linux/locate("`File Locating`")
linux/BasicFileOperationsGroup -.-> linux/cp("`File Copying`")
shell/BasicSyntaxandStructureGroup -.-> shell/shebang("`Shebang`")
shell/BasicSyntaxandStructureGroup -.-> shell/comments("`Comments`")
shell/BasicSyntaxandStructureGroup -.-> shell/quoting("`Quoting Mechanisms`")
shell/VariableHandlingGroup -.-> shell/variables_decl("`Variable Declaration`")
shell/VariableHandlingGroup -.-> shell/variables_usage("`Variable Usage`")
subgraph Lab Skills
shell/if_else -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
linux/source -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
linux/echo -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
linux/mkdir -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
linux/find -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
linux/locate -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
linux/cp -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
shell/shebang -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
shell/comments -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
shell/quoting -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
shell/variables_decl -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
shell/variables_usage -.-> lab-301465{{"`Copy Large Files with Preserved Structure`"}}
end