https://github.com/hrmeetsingh/linux_command_examples
Useful linux commands and shortcuts
https://github.com/hrmeetsingh/linux_command_examples
Last synced: 10 months ago
JSON representation
Useful linux commands and shortcuts
- Host: GitHub
- URL: https://github.com/hrmeetsingh/linux_command_examples
- Owner: hrmeetsingh
- Created: 2020-02-18T15:05:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-18T15:28:12.000Z (almost 6 years ago)
- Last Synced: 2025-01-03T08:31:27.565Z (12 months ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linux Command Examples
## cURL - for quick API performance test
As per the curl man page, *"Make curl display information on stdout after a completed transfer. The format is a string that may contain plain text mixed with any number of variables. The format can be specified as a literal "string", or you can have curl read the format from a file with "@filename" and to tell curl to read the format from stdin you write "@-"."*
Run the following command fron inside the "curl" folder to get quick performance numbers for an API -
`curl -w "@curl-format.txt" -s -k -o /dev/null `
Example -
`curl -w "@curl-format.txt" -s -k -o /dev/null "https://www.google.com"`
Result -
` response_code: 200`
` time_namelookup: 0.005137`
` time_connect: 0.009728`
` time_appconnect: 0.133735`
` time_pretransfer: 0.134052`
` time_redirect: 0.000000`
` time_starttransfer: 0.250884`
` ----------- `
` time_total: 0.263603`