Open jbeadling opened 11 months ago
Absolute paths is a specific path to a file or directory from the root directory of the file system. An example would /home/user1/reports.
Relative paths specify a location of a file in relation to your current working directory. An example would be your in your home directory and you go into one of the directories inside which simple be cd documents
which takes you into the documents directory in your home directory, if you wanted to go into a directory nested in documents then you would type cd documents/reports
/ is the root of any unix file structure, so cd /
will put you at the root level.
To instantly move to your home directory, you can just type cd ~
, the ~ indicates your home directory. You can also just type cd and hit enter, you'll go to your home directory
To move to the current directory's parent directory you can use cd ..
. Think of it as going back one in the directory structure.
Below is screenshot of me going through the exercises
Ticket: Describe What File Paths Are and How to Use Them
Summary
Learn the fundamentals of file paths in a Unix-like operating system and how to correctly navigate and specify them in various commands.
Description
Objective: Understand file paths' concept, structure, and how they navigate the filesystem and specify locations for various operations.
Scope:
cd,
ls,
and more~
,.
,..
,/
)Learning Tasks
Types of File Paths:
Navigating File Paths:
cd
and inspecting them usingls.
Common Symbols:
~
for the home directory,.` for the current directory, and
..` for the parent directory.Best Practices and Pitfalls:
Hands-on Practice:
..
and `` to move around directories.Troubleshooting:
Learning Goals
Priority