美文网首页
2020-08-14

2020-08-14

作者: 林佳_6544 | 来源:发表于2020-08-14 12:11 被阅读0次

    ```bash

    function printDeleteIdeaExec(){

        user_home=~

        # 在 ~/Library/Logs/JetBrains 找idea的配置

        log_dir=$user_home/Library/Logs/JetBrains

        ls -1 $log_dir | awk '{ print "rm -rf \""pwd"/"$0"\""}' pwd=$log_dir | grep IntelliJIdea

        # 在 ~/Library/Preferences 找idea的配置

        pre_dir=$user_home/Library/Preferences

        ls -1 $pre_dir | awk '{ print "rm -f \""pwd"/"$0"\""}' pwd=$pre_dir | grep jetbrains

        # 在 ~/Library/Application Support/JetBrains 找idea的配置

        sup_dir="$user_home/Library/Application Support/JetBrains"

        ls -1 "$sup_dir" | awk '{ print "rm -rf \""pwd"/"$0"\""}' pwd="$sup_dir" | grep IntelliJIdea

        # 在 ~/Library/Caches/JetBrains 找idea的配置

        cache_dir="$user_home/Library/Caches/JetBrains"

        ls -1 "$cache_dir" | awk '{ print "rm -rf \""pwd"/"$0"\""}' pwd="$cache_dir" | grep IntelliJIdea

        # 删除idea的工作空间

        idea_dir="$user_home/.idea"

        echo "rm -rf $idea_dir"

    }

    ```

    相关文章

      网友评论

          本文标题:2020-08-14

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