Linux, use the command to view the directory information, view the current directory path, clear the contents of the terminal

View Directory command


learning target

  • Linux commands can be used to view the directory information

1. Check the directory using the command

command Explanation
ls View the current directory information
tree Display directory information tree way

ls command renderings:

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-85vwmDJv-1583849919617) (imgs / ls.png)]

tree command renderings:

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-7aPm3MU5-1583849919618) (imgs / tree.png)]

2. Review the current directory path

command Explanation
pwd View the current directory path

pwd command renderings:

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-wkAcygBV-1583849919618) (imgs / pwd.png)]

3. Clear the terminal content

command Explanation
clear Clear terminal content

FIG clear command Effect:
Here Insert Picture Description
Here Insert Picture Description

4. Summary

  • ls and view the directory information tree is our most commonly used commands
  • ls can only view a directory information
  • You can view multiple layers directory information tree.
Published 698 original articles · won praise 929 · views 120 000 +

Guess you like

Origin blog.csdn.net/qq_35456045/article/details/104785038