1. 遗憾的是不能或者说不是很方便,不过可以使用rsync工具来实现。 rsync -av --exclude '*.svn' user@server:/my/dir . 为什么不说不是很方便?因为网上看到的有些解决方案是通过正则表达式来实现的。如: scp -r [!.]* server:/path/to/something 这个例子就是将当前目录下除了“.***"格式的文件传输到server上。 当然还可以使用管道来组合命 ...

    阅读全文
  2. localhost:~root$ rsync --help rsync version 2.6.9 protocol version 29 Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others. <http://rsync.samba.org/> Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchf ...

    阅读全文
  3. 如何使用cp命令复制时来exclude一些特殊的文件或目录? 很遗憾cp没有提供这个功能!!!!!! 它没有windows下的xcopy类似功能。 不过linux提供了另一个命令来更好的实现这个功能,那就是rsync指令。 rsync -av --progress sourcefolder /destinationfolder --exclude thefoldertoexclude 不过cp虽然没有提供exclude选项,有时还是有workaround的。 ...

    阅读全文