Linux bash常用命令案例记录

  1. scp (if the private key is id_rsa, [-i] can be removed)
    scp -i key -P port localfile user@ip:path

  2. back to the beginning of line
    Ctrl + a

  3. go to the end of line
    Ctrl + e

  4. cut character from current position to the beginning
    Ctrl + u

  5. cut character from current position to the end
    Ctrl + k

  6. set timezone
    timedatectl set-timezone Asia/Hong_Kong

  7. run in background
    nohup command > logfile 2>&1 &

  8. use ImageMagick to crop an image file(WIDTHxHEIGHT+X+Y)
    convert input.jpg -crop 100x100+12+34 output.jpg

  9. use ImageMagick to concatenate different size image files
    horizontally
    convert +append image1.jpg image2.jpg image3.jpg output.jpg
    vertically
    convert -append image1.jpg image2.jpg image3.jpg output.jpg

posted @   摩斯乱码  阅读(7)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】
点击右上角即可分享
微信分享提示