Revisiting Paths
Here's a video on using the command line to navigate the file system or the paths. This is not a transcript, but in this video, I use commands like:
cd
to change directoriescd -
(cd dash) to change to the previous working directorycd ~
(cd tilde) to change to the home directorycd ..
(cd dot dot) to change to the directory up one level
mkdir -p
to make multiple directoriesrm
to remove filesrm ../file.txt
to remove a file up one levelrm ~/file.txt
to remove a file in my home directoryrm ~/test0/test1/test2/file.txt
to remove a file nested in multiple sub-directories
cp
to copy filescp file.txt ../../../
to copy a file multiple directories up from current positioncp bin/file.txt documents/file.txt
to copy a file in my bin directory to my documents directory
mv
to move or rename a filemv file.txt test0/test1/test2/
to move a file in my home directory to the nested directoriesmv bin/file.txt documents/file.txt
to move a file from my bin directory to my documents directory
tree -d
to visualize the directory structure from my current directoryfind . -name "file.txt"
to search for a file in my directories that's named "file.txt"
I hope this video helps. Please let me know if you have any questions.