Part 2 - Navigation Flashcards
How the shell treats the directory structure of the system. Absolute and relative pathnames. Basic commands that are used to move about the structure.
What does the command pwd do?
Print name of current working directory
What does the cd command do?
change directory
What does the ls command do?
List directory contents
How files organized in Linux?
A Hierarchical Directory Structure
What is the first directory in a file system called?
The root directory
How many file system trees does linux have?
Always a single file system tree
How are storage devices mounted?
at various points on the tree
according to the whims of a system admin.
What does an ‘upended’ tree mean?
The root directory is at the top and the various branches are descending below.
What is the way to imagine the Linux file system.
An upside down tree, we can see the path directly above us (parent directory) and the directory we are standing in is called the current directory.
What is file path directly above you called ?
Parent directory
What is the directory you are currently in called?
Current working directory
In what two ways can pathnames be specified?
absolute pathnames and relative pathnames
What is an absolute pathname?
Begins with root directory and follows the tree branch by branch until the path to the desired directory or file is completed.
What is a relative pathname?
starts from the root directory and leads to its destination by using special symbols of . and ..
What does ‘.’ in a relative pathname refer to?
the working directory
What does ‘..’ refer to?
the directory’s parent directory.
What is the difference between ‘ cd /usr’ and ‘ cd ..’ ?
The first is the absolute pathname and the second is the relative pathname
What is the difference between ‘cd ./bin’ and ‘cd /usr/bin’ ?
The first is the relative pathname and it is more efficient to use, the second is the absolute pathname.
Can you omit the ./ cause it is implied?
true, it can be ‘cd bin’ instead of ‘cd ./bin’
What is the difference between cd, cd - and cd ~user_name ?
cd changes the directory, cd - changes the working directory to the previous directory and cd ~username changes the working directory to the home directory of that user.
T/F Are filenames and commands case sensitive in Linux?
True
What should you limit your punctuation to when creating filenames?
period . dash - and underscore _
What should you avoid using entirely in filenames?
spaces, instead use underscores _