Skip to content

Instantly share code, notes, and snippets.

@winse
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save winse/fd20a3e42e46d7dace34 to your computer and use it in GitHub Desktop.
Save winse/fd20a3e42e46d7dace34 to your computer and use it in GitHub Desktop.
一气呵成把tar文件上传到服务器,同时在服务器解压,同时过滤部分文件
winse@Lenovo-PC /cygdrive/e/local/opt
$ ssh hadoop@cluster ' cat | tar zxf - --exclude=sources --exclude=doc --exclude=*.cmd ' < ./hadoop-2.2.0.tar.gz
winse@Lenovo-PC /cygdrive/e/local/opt
$ ssh root@cluster ' cat | tar zxf - ' < ./jdk-7u60-linux-i586.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment