Introduction
In this project, you will learn how to copy files from the /etc
directory with a last modified year in 2022 to the /tmp/etc
directory while preserving the directory structure.
🎯 Tasks
In this project, you will learn:
- How to create a script to automate the file copying process
- How to use the
find
command to search for files based on their last modified date
- How to use the
cp
command to copy files while preserving the directory structure
🏆 Achievements
After completing this project, you will be able to:
- Automate the process of copying files from a specific directory based on their last modified date
- Understand how to use common shell commands like
find
and cp
to manipulate files and directories
- Apply your knowledge to solve real-world file management tasks
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
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(("`Shell`")) -.-> shell/ControlFlowGroup(["`Control Flow`"])
shell(("`Shell`")) -.-> shell/AdvancedScriptingConceptsGroup(["`Advanced Scripting Concepts`"])
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/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`")
shell/ControlFlowGroup -.-> shell/for_loops("`For Loops`")
shell/ControlFlowGroup -.-> shell/while_loops("`While Loops`")
shell/AdvancedScriptingConceptsGroup -.-> shell/arith_ops("`Arithmetic Operations`")
subgraph Lab Skills
linux/source -.-> lab-301463{{"`Collect Files From Specified Time`"}}
linux/echo -.-> lab-301463{{"`Collect Files From Specified Time`"}}
linux/mkdir -.-> lab-301463{{"`Collect Files From Specified Time`"}}
linux/find -.-> lab-301463{{"`Collect Files From Specified Time`"}}
linux/cp -.-> lab-301463{{"`Collect Files From Specified Time`"}}
shell/shebang -.-> lab-301463{{"`Collect Files From Specified Time`"}}
shell/comments -.-> lab-301463{{"`Collect Files From Specified Time`"}}
shell/quoting -.-> lab-301463{{"`Collect Files From Specified Time`"}}
shell/variables_decl -.-> lab-301463{{"`Collect Files From Specified Time`"}}
shell/variables_usage -.-> lab-301463{{"`Collect Files From Specified Time`"}}
shell/for_loops -.-> lab-301463{{"`Collect Files From Specified Time`"}}
shell/while_loops -.-> lab-301463{{"`Collect Files From Specified Time`"}}
shell/arith_ops -.-> lab-301463{{"`Collect Files From Specified Time`"}}
end