Common commands for linux study notes

1.touch directory structure/filename to create a file

 

2.cat shows the file content 

   -n show line numbers

   tca file shows content backwards

 

3.more paging to display file content

   space or f to turn pages 

   Carriage return page by line 

   Q quit

 

4.less 

stronger than more  

Multiple pages can be paged up pageUp Previous page Up arrow page up line by line

Searchable content 

/keyword n ​​key Skip to next search

 

5.head can see the first n lines of a file

   head -n file name -- no n is added to display 10 lines by default

 

6.tail displays the last few lines of the file 

   -f Dynamically display the last 10 lines of the file

 

7.ln link command

   ln -s [source file] [object file] create a soft link

   ln   [source file] [object file] create a hard link  

   Soft links: equivalent to shortcuts in Windows

   Hard link: equivalent to copying the source file, when the link file is modified, the source file is modified synchronously

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327069046&siteId=291194637