美文网首页
Devops 练习题

Devops 练习题

作者: camy | 来源:发表于2022-01-16 13:04 被阅读0次

    Liunx相关问题

    1 Sample interview question:

    We have a fairly large log file. Each line of the log file contains an url which a user has visited on our site. We want to figure out what's the most popular 10 urls visited by our users.

    Sample logs https://raw.githubusercontent.com/elastic/examples/master/Common%20Data%20Formats/apache_logs/apache_logs

    ### A1:

    - Use command "AWK"

    - Then sort and count

    ```

    curl log-URL | awk '{print $7}' | sort | uniq -c | sort -r| head -10

    ```

    相关文章

      网友评论

          本文标题:Devops 练习题

          本文链接:https://www.haomeiwen.com/subject/uzjfhrtx.html