Two week first Class (January 29)
2.6 Relative and absolute paths
2.7 CD command
2.8 Creating and deleting catalogs Mkdir/rmdir
2.9 RM Command
2.6 Relative and absolute paths
Path is where the file is stored
An absolute path is a path that starts from the root
The relative path is the path relative to the location.
CD is shorthand for change directory.
Run the CD and go to your home directory.
The appended directory name is switched to the specified directory.
2.7 Command CD
Command cd-to view the last command used, like a TV remote key (return key)
Command CD to enter the user's home directory
Command CD ~ Enter the user's home directory
Command CD: Returns to the previous level of the directory.
2.8 Creating and deleting catalogs Mkdir/rmdir
The command mkdir (shorthand for Make directory) is used to create the directory.
Mkdir-p can create cascading catalogs.
Do not add-p cannot be created
Add-p to create a
You can see the process of creating a cascading catalog.
Command RmDir is a shorthand for remove diretory.
RmDir only empty directories can be deleted
Rmdir-p can delete a cascading directory
2.9 RM Command
RM Command RM is a shorthand for remove and can delete files and non-empty directories.
RM to delete files when asked
Command rm-f do not ask when deleting a file
Command! Tree view the most recent command to start with the tree
Order history to see the command that was knocked over.
You can see the command at the beginning of the last tree
The UP ARROW key is also available, so you can see the commands you've used.
RM cannot delete directories, rm-r can be deleted, will ask, plus-RF can not be asked to delete.
RM-RFV can see the removal process, delete the file first, and then delete the directory.
RM-RFV Delete non-existent files without error.
Linux Two week first class (January 29) Notes