{"id":17543593,"url":"https://github.com/wesleyone/shell","last_synced_at":"2025-03-29T05:34:03.580Z","repository":{"id":114314343,"uuid":"369602112","full_name":"WesleyOne/shell","owner":"WesleyOne","description":"一些脚本","archived":false,"fork":false,"pushed_at":"2021-05-24T09:51:36.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-03T15:55:41.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WesleyOne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-21T17:01:37.000Z","updated_at":"2021-05-24T09:51:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"33779f64-7361-4378-a6c1-4e8bad73c76d","html_url":"https://github.com/WesleyOne/shell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WesleyOne%2Fshell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WesleyOne%2Fshell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WesleyOne%2Fshell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WesleyOne%2Fshell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WesleyOne","download_url":"https://codeload.github.com/WesleyOne/shell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246145012,"owners_count":20730494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-21T00:24:57.048Z","updated_at":"2025-03-29T05:34:03.563Z","avatar_url":"https://github.com/WesleyOne.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shell\n一些脚本\n\n## OSS命令上传文件（osscp.sh）\n\n👍感谢[官方工具ossutil](https://help.aliyun.com/document_detail/50452.html)[(源码)](https://github.com/aliyun/ossutil)的支持，更多命令推荐使用官方工具。\n\n\u003e 本脚本使用限制:目前仅支持MacOS、CentOS、Ubuntu的64位/32位系统\n\n### 使用方法：\n\n1. 下载脚本\n\n2. 修改配置\n```sh\n# 访问OSS配置（以下四个变量必须替换成可用信息）\n# 填写Bucket所在地域的Endpoint，建议使用内网域名\nendpoint=\"oss-cn-hangzhou.aliyuncs.com\"\n# 填写账号的AccessKey，尽量限制该账号的权限\naccessKeyID=\"***\"\naccessKeySecret=\"***\"\n# Bucket名称及其内的文件夹名称\nbucketAndFold=\"***/***/\"\n```\n\n3. 脚本添加执行权限\n```sh\nchmod +x osscp.sh\n```\n\n4. 上传指定文件\n```sh\n./osscp.sh [filename1] [filename2] [filenameN]\n```\n\n### 提醒\n\n- 建议使用OSS的内网endpoint\n- 按需为accessKey用户分配最小权限\n- `osscp.sh`配置修改完成后，可上传至OSS，便捷后续使用。（设置私有访问，防止配置外泄）\n\n### 最佳实践\n\n#### 下载内网ECS的内存Dump文件\n\n```shell\n# 获取内存 Dump 文件的命令：\njmap -dump:format=b,file=生成的文件名 进程号\n\n# 压缩文件\ngzip 文件名\n\n# 上传文件\n./osscp.sh 文件名.gz\n\n# 登陆OSS控制台或客户端下载文件\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesleyone%2Fshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwesleyone%2Fshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesleyone%2Fshell/lists"}