Check a list of URLs concurrently and print status codes
Build a paste-ready command, then review its compatibility and effects before running it.
xargs -P <workers> -n 1 curl -sS -o /dev/null -w '%{http_code}\t%{url_effective}\n' < <file>Complete required fields to copy the generated command.
Compatibility
Linux + macOSVerified for Linux, macOS using bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementsxargsxargs must be installed and available on PATH.Network accessThe target must be reachable from the current environment.
Version supportxargs Current supported releasesVerified for linux, macos using bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signals200 https://example.com/Representative successful output; values vary with the selected target and system state.
Known errorsxargs: command not foundxargs is missing or is not available on PATH.
Verifyxargs -P {{workers}} -n 1 curl -sS -o /dev/null -w '%{http_code}\t%{url_effective}\n' < {{file}}The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01xargsCommandRuns the xargs stage of this one-liner.
02-POptionConfigures xargs with the -P option.
03<workers>ParameterA value supplied in the Fill parameters section.
04-nOptionApplies the command-specific numeric, dry-run, or non-resolving mode.
051ArgumentPasses 1 to xargs.
06curlArgumentPasses curl to xargs.
07-sSOptionConfigures xargs with the -sS option.
08-oOptionSelects an output file or output format for this command.
09/dev/nullArgumentPasses /dev/null to xargs.
10-wOptionConfigures xargs with the -w option.
11'%{http_code}\t%{url_effective}\n'ArgumentPasses '%{http_code}\t%{url_effective}\n' to xargs.
12<RedirectionRedirects command input, standard output, or error output.
13<file>ParameterA value supplied in the Fill parameters section.
This advanced community-curated one-liner combines several stages. Review every option and placeholder before running it.
Example input
xargs -P 4 -n 1 curl -sS -o /dev/null -w '%{http_code}\t%{url_effective}\n' < urls.txt
Example output
200 https://example.com/
301 https://www.example.org/
503 https://status.example.net/
Illustrative output — exact values vary by system and data.
Official sources