Jump in Linux file system

pwd - print out the name of the current working directory  "print working directory"

cd - change directory

ls - List the contents of the directory

 

3.1 Understanding the file system tree (inverted tree)

Linux organizes all files in a hierarchical directory structure, and all files form a tree-shaped directory ( called a folder in Window )

The first-level directory of the file system is called the root directory

The root directory and subdirectories contain files and subdirectories

The linux system has only a single file system tree, no matter how many storage devices are " mounted " to the computer

3.2 Current working directory

   When logging in to the system for the first time, the current working directory is the Home directory. Log in to the system as an ordinary user. The Home directory is the only place where files can be written.

3.3 List the contents of the directory

  ls -l

3.4 Absolute path

   cd /home/user_Lin/test #The     path starting from the root directory

  

3.5 relative path

   .               # Indicates the current working directory

   ..              #Indicates the upper level directory

   cd ./user_Lin/test #The           path starting from the current working directory

   cd ..

 

3.6 Change the current working directory

About cd shortcut commands

  cd # switch directory to Home

  cd-# Switch to the previous WD

  cd ~user_name # switch to user_name's home directory

 

Rules about file names

        The maximum length of a Linux file name is 255 characters

          The file name cannot contain'/' and'/0', because they have special meaning to the Linux kernel

            touch filename # can create a file

               

          And what has a special meaning to Shell:? * [] '"` | <;> \ ()% $! & 

  1. File names beginning with "." are hidden files
  2. File names and command names are case sensitive
  3. Linux no file extension
  4. Support long file name "." "," "-" spaces, (do not use spaces, tabs, control characters)

             There may be characters with special meanings that can create files normally in the system, but may cause errors in actual operations

 

 

 

Guess you like

Origin blog.csdn.net/weixin_43495262/article/details/114752094