Cleaning Up
Part of the Fundamentals section of Coddy's Terminal journey. Lesson 24 of 82.
Challenge
MediumGreat work! Time to do the final cleanup to finish the project:
- Rename
nature/beach.jpgtonature/beach_edited.jpgusingmv - Copy
notes.txtinto each of the three photo folders (nature/,travel/,family/) usingcp - Delete the original
notes.txtfrom the home directory usingrm - Verify the final state by listing:
- The home directory with
ls - The nature folder with
ls nature - The travel folder with
ls travel - The family folder with
ls family
- The home directory with
Run the four listings as four separate commands, in the order above (
ls, thenls nature,ls travel,ls family). Combining them into one command such asls nature travel familyprints extra headings and the check will not match.
When done, your home directory should only contain the three folders: no loose files. Each folder should have its photos plus a copy of
notes.txt.
Try it yourself
mv beach.jpg nature/
mv mountain.jpg nature/
mv sunset.jpg nature/
mv paris.jpg travel/
mv family.jpg family/
ls nature
ls travel
ls familyAll lessons in Fundamentals
4Directories
Create A DirectoryCopy A DirectoryMove And Rename A DirectoryDelete A DirectoryRecap - Directory Operations7File Content
Head And TailWord CountSort CommandUnique CommandGrep BasicsGrep With FlagsRecap - Text Detective2Navigation
Print Working DirectoryList FilesChange DirectoryAbsolute vs Relative PathsHome And Root DirectoryRecap - Find Your Way8Redirection
Standard OutputOverwrite To A FileAppend To A FileStandard InputStandard ErrorRecap - Log Builder6Wildcards And Patterns
The Star WildcardThe Question Mark WildcardBracket WildcardsCombining WildcardsRecap - Selective Operations9Piping
What Is A PipeChaining Two CommandsChaining Multiple CommandsPipe With GrepRecap - Data PipelinePractice on your own: Terminal playground