{"id":23302131,"url":"https://github.com/pujansrt/commands","last_synced_at":"2026-01-25T08:32:42.780Z","repository":{"id":127199321,"uuid":"201291622","full_name":"pujansrt/commands","owner":"pujansrt","description":"Productivity Commands List for macOS Software Development","archived":false,"fork":false,"pushed_at":"2020-03-11T19:57:01.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T15:14:44.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/pujansrt.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":"2019-08-08T15:57:55.000Z","updated_at":"2020-03-11T19:57:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"b321a85c-599e-4a87-ae86-224cae78fcf5","html_url":"https://github.com/pujansrt/commands","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pujansrt/commands","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pujansrt%2Fcommands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pujansrt%2Fcommands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pujansrt%2Fcommands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pujansrt%2Fcommands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pujansrt","download_url":"https://codeload.github.com/pujansrt/commands/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pujansrt%2Fcommands/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28749353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T08:31:04.260Z","status":"ssl_error","status_checked_at":"2026-01-25T08:30:28.859Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-12-20T10:18:48.697Z","updated_at":"2026-01-25T08:32:42.766Z","avatar_url":"https://github.com/pujansrt.png","language":null,"readme":"# Commands\nProductivity Commands List\n\n[Bash Commands](bash.md)\n\n[Brew Commands](brew.md)\n\n[Curl Commands](curl.md)\n\n[Fetch Commands](fetch.md)\n\n[macOS Commands](mcos.md)\n\n[NPM Commands](npm.md)\n\n## Find\n\n\n```shell script\n# Find and Replace\nfind . -name \"*.java\" -print0 | xargs -0 sed -i '' -e 's/packtpub/appkubos/g'\n\n# Find and du\nfind . -name \"node_modules\" -type d -prune | xargs du -chs\n```\n\n\n## sed \u0026 awk\n\n```shell script\nsed -i -e 's/\u003cfirst\u003etrue\u003c\\/first\u003e/\u003cfirst\u003efalse\u003c\\/first\u003e/' /Users/psrivastava/scripts/config/settings.xml\n\ncat apache2/httpd.conf | sed '/ *#/d;/^ *$/d' # there are spaces between / , * and /^, *$\n\n# print 5-12 lines of file\nsed -n '5,12p;12q' ~/a.txt\n\n# Replace the first occurrence of a string in a file, and print the result:\nsed 's/find/replace/' filename\n\n# Replace all occurrences of an extended regular expression in a file:\nsed -E 's/regex/replace/g' filename\n\n# Replace all occurrences of a string in a file, overwriting the file (i.e. in-place):\nsed -i '' 's/find/replace/g' filename\n\n# Replace only on lines matching the line pattern:\nsed '/line_pattern/s/find/replace/' filename\n\n# Print only text between n-th line till the next empty line:\nsed -n 'line_number,/^$/p' filename\n\n# Apply multiple find-replace expressions to a file:\nsed -e 's/find/replace/' -e 's/find/replace/' filename\n\n# Replace separator / by any other character not used in the find or replace patterns, e.g., #:\nsed 's#find#replace#' filename\n\nhistory | awk '{print $2}'\n```\n\n## Database Related\n\n### Export to Single csv file\n```sql\n@set maxrows 10000000;\n@export on;\n@export set filename=\"/Users/pujan/result.csv\" CsvIncludeColumnHeader=false CsvColumnDelimiter=\",\";\n\nSELECT\n    * \nFROM\n    TABLE\nWHERE\n    CONDITIONS\n;\n\n@export off;\n```\n[Exporting Query Results](http://confluence.dbvis.com/display/UG100/Exporting+Query+Results)\n\n### Import SQL\n\n```shell script\nmysql --verbose --host=abc.us-east-1.rds.amazonaws.com --port=3306 --database=dbname --user=admin --password=\"password\" -e \"source /Users/pujan/myfile.sql\" \n```\n\n## Miscellaneous Commands\n\n```bash\ntldr split # Too Long dont read\n\ndate +'%Y-%m-%d %H:%M:%S.%s'\n\npgrep -i plex\n\naws sts assume-role --profile xyz\n\ndig my.net\ndig my.net @8.8.8.8\ndig my.net +trace\ndig my.net NS\n\nhistory | grep -v \"cd\\|ls\\|vi\\|sudo\\|cat\\|open\\|touch\\|cp\\|mv\\|git\\|rm\\|npm\\|ack\\|pwd\\|node\\|code\\|mkdir\\|tsc\"\n```\n\n## Convert Commands\n\n```bash\n# Horizontal combine pictures\nconvert +append a.png b.png out.png\n\n\n# Vertical combine\nconvert -append name-*.jpg op.jpg\n```\n\n## Jar Commands\n\n```bash\n# Diff two jars\npkgdiff ~/EAFCore.jar workspace_ERP/LibsProj/EAFCore.jar\n\n# Find text inside jar\nzipgrep \"setAuthType\" some.jar\nfor file in *.jar; do unzip -c \"$file\" | grep \"1.1-SNAP\"; done\n\n# Directory to jar\njar cvf hackapp.jar -C classes .\n\n# Extract war/jar\nunzip package.war -d mydir\n\n# View jar\njar tvf MavenwebappwithTomcat-1.war\n```\n\n## Most Used Commands\n```bash\nsplit -l 5000 query.sql file_part_\n\nhistory | tr -s ' ' | cut -d ' ' -f3 | sort | uniq -c | sort -n | tail | perl -lane 'print $F[1], \"\\t\", $F[0], \" \", \"▄\" x ($F[0] / 12)'\n\nmvn\t219     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\ncp\t241     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\nrm\t314     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\nvi\t360     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\ngit\t367     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\ncat\t379     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\nnpm\t566     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\nls\t687     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\nack\t1405    ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\ncd\t1487    ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\n\nack # most used command for finding files use -i for ignore case in PWD\n\naws-shell # autocomplete aws command line\n\nmac XYZ # various useful mac commands i.e. mac lock\n\ntree -I 'node_modules|test-coverage|*.js|*.png|*.sh|*.json' # listing of files in PWD\n\nexport LC_ALL=en_US.UTF-8 \u0026\u0026 export LANG=en_US.UTF-8 # Incase utf-8 missing from macOS terminal\n\nredis-server /usr/local/etc/redis.conf # redis\n\nhistory | grep -v \"cd\\|ls\\|vi\\|sudo\\|cat\\|open\\|touch\\|cp\\|mv\\|git\\|rm\\|npm\\|ack\\|pwd\\|node\\|code\\|mkdir\\|tsc\\|switcher\\|curl\\|sleep\\|ssh\\|find\\|which\\|chmod\\|assume.sh\\|sed\\|dig\\|aws\\|export\\|brew\\|history\\|make\\|history\\|ps\"\n\nzipgrep \"Initial WSDL\" some.jar\n\ndu -a * | sort -r -n | head -20\n\nngrok http 8000\n\ntest -f xxx.txt || echo \"File does not exist\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpujansrt%2Fcommands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpujansrt%2Fcommands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpujansrt%2Fcommands/lists"}