Skip to content

Instantly share code, notes, and snippets.

@limboinf
Last active December 6, 2018 09:44
Show Gist options
  • Save limboinf/7edd86b90c57edc228608499a631fd5e to your computer and use it in GitHub Desktop.
Save limboinf/7edd86b90c57edc228608499a631fd5e to your computer and use it in GitHub Desktop.
[linux tips]

在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特殊符号大全

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment