linux further instruction 2

7. date instruction (key) indicates the operation time and date (read, set)

eg1:  #date

 

 

 eg2: #date +% F is equivalent to #date "+% Y-% m-% d"

 

 

 eg3: #date "+% F% T" quotes indicate the date and hour, minute, let become an indivisible whole

        It is equivalent to: #date "+% Y-% m-% d% H:% M:% S"

 

 

 eg4: get some time before or after the (backup)

 #date -d  "-1day"   "+%Y-%m-%d  %H:%M:%S"

  Or #date -d "-1year" ~~~~~~

~~~~~~~~~~~

 

 

 8. cal instruction: for operating the calendar

  eg: #cal equivalent to #cal -1 

         Direct output of the current month's calendar

 

 

 

 eg2:  #cal  -3

         Show this month, last month, next month's calendar

 

 

 eg3: #cal -y Year

        The output of a calendar year

  

 

 

 eg4: Calendar #cal -s display to Sunday as the first column

        #Cal -m calendar display to Monday for the first column

       

 

 

 

 

 

 9. clear or ctrl + L  

   Clear terminal existing orders and results

  Note: not really clear, but the information is hidden in the top, can be viewed with the flow strip

 10. Pipeline

  Pipe character: |

 Conduit may generally be used for filtering particular, expansion processing

  Syntax: can not be used alone, in conjunction with the previous instruction requires, mainly supporting role

 eg1:

 

Special Use Case: achieving the equivalent of less effect (understand)

 

 

 Extended treatment:

 

Guess you like

Origin www.cnblogs.com/lin1216/p/11608237.html