在linux中,-
如果单独使用 - 符号,不加任何该加的文件名称时,代表"标准输入"的意思
如下小技巧,nc
命令来传输目录下多个文件
# host A, on receiver, go to destination directory and execute:
$ nc -l $port | tar xf -
# host B,on sender
$ tar cf - . | nc $hostA $port
ref: linux特殊符号大全
在linux中,-
如果单独使用 - 符号,不加任何该加的文件名称时,代表"标准输入"的意思
如下小技巧,nc
命令来传输目录下多个文件
# host A, on receiver, go to destination directory and execute:
$ nc -l $port | tar xf -
# host B,on sender
$ tar cf - . | nc $hostA $port
ref: linux特殊符号大全