Linux commands-basic common commands

Based on some commands used in the project

  1. Restart the service:pm2 reload xxx
  2. Display the current file:ls
  3. Delete file command:rm -rf xxx
  4. Modify a file:vim ./xxx
  5. drop out::q
  6. Exit without saving::q!
  7. Save and exit::wq
  8. Display the path of the current location:pwd
  9. Copy the files on the server and use them as backup:sz xxx
  10. Full deployment code:
    10.1: Code backup: cd /opt/webEnter the project file and execute the backup command tar -cvf xxxx.tar i8Community || i8WorkflowNode
    10.2: Enter the root directory: cd /--> Enter the script directory: cd script--> Execute the update script:./release_community.sh || ./release_workflow.sh
  11. PM2 common commands
    11.1: Start --> pm2 start app.js
    11.2: View --> pm2 list
    11.3: Restart --> pm2 restart app.js
    11.4: Stop --> pm2 stop xxx;pm2 stop all
    11.5: Delete --> pm2 delete xxx;pm2 delete all
    11.6: View log --> pm2 ls;pm2 info xxx;view /test/pm2_logs/i8workflow.log
    11.7: View history --> history | grep xxx
    11.8: Stop /Restart nginx on the server:/opt/tengine/sbin/nginx -s stop | ~/nginx -s start

Guess you like

Origin blog.csdn.net/weixin_43996999/article/details/107865272
Recommended