← 返回命令列表

Linux one-liner

用 Bash 写一个单行 Web 服务器

网络

while true; do echo -e "HTTP/1.1 200 OK\n\n$(date)" | nc -l 8080; done

复制后可按需替换文件名、目录或参数。