2 ms·
Very nice. It was challenged by my go to command: tar cf - . | (cd /dest/dir ; tar xvf -) Which uses tar to copy a directory tree. It didn't know '.' stood
by ChuckMcM 13y ago
Very nice. It was challenged by my go to command:
tar cf - . | (cd /dest/dir ; tar xvf -)
Which uses tar to copy a directory tree. It didn't know '.' stood for the current directory, it missed out that 'f -' was the file "standard in" / "standard out"
- gahahaha 13y agoWhy do you use that instead of cp -R ? I would normally only use your version if I was copying a directory tree over ssh.
- Aissen 13y agoI think you mean cp -a. cp -R doesn't preserve permissions and other goodies of tar.
- ChuckMcM 13y agoGenerally tar to tar transfers have a couple more options, one being not to step across file systems, one being to keep symlinks intact (or not), and one being to avoid filling in 'holey' files. Of course those things might not be true any more, basically I got habituated to using it when I was Sun and it continues to work, so my fingers haven't tried to learn a new pattern.