1. # /home/yiqin
    2. if [ $1x = "-l"x ] ; then
    3. /home/yiqin/sh/oms-backend.log.view.sh;
    4. elif [ $1x = "-d"x ] ; then
    5. source /home/yiqin/sh/dir-list.sh;
    6. else
    7. echo 请输入命令:
    8. echo -e "\t" -d 查询常用目录
    9. echo -e "\t" -l 查看最新日志
    10. fi
    11. # /home/yiqin/sh/oms
    12. logfile=`ls /data/web/app/runtime/logs/manager-seller/all/ | tail -n 1`
    13. tail -fn 1000 /data/web/app/runtime/logs/manager-seller/all/$logfile
    14. # /home/yiqin/sh/dir
    15. echo -e "\t 1. /home/yiqin/oms-backend oms-backend项目目录"
    16. echo -e "\t 2. /data/web/app/runtime/logs/manager-seller/all oms-backend日志目录"
    17. echo -e "\t 3. /usr/local/nginx/conf/vhost/yiqin nginx配置路径"
    18. echo -e "\t 4. /home/yiqin/log/nginx/oms-backend.error.log nginx错误日志"
    19. echo -e "\n"
    20. read -t 3000 -p "请输入要执行数字项": num
    21. echo -e "\n"
    22. if [ $num == 1 ]
    23. then
    24. cd /home/yiqin/oms-backend
    25. elif [ $num == 2 ]
    26. then
    27. cd /data/web/app/runtime/logs/manager-seller/all
    28. elif [ $num == 3 ]
    29. then
    30. cd /usr/local/nginx/conf/vhost/yiqin
    31. elif [ $num == 4 ]
    32. then
    33. tail -fn 500 /home/yiqin/log/nginx/oms-backend.error.log
    34. fi