Re: Copress a directory
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
>>> Can anyone tell me how to compress a directory so that I could SCP it
>>> to remote server more quikly? I tried gzip -cf directoryName it does
>>> not work, And then I tried tar -vf DirectoryNme no rerult as well. I
>>> may blind but I could not find solution in gzip --help as well.
>>>
>>> Thanks a lot in advance!
>>>
>> tar -cvj directory -f directory.tar.bz2
>
> Or, for those who think it is a sin to use '-' when it isn't required:
>
> tar jcvf dir.tar.bz2 dir
>
> for bzip2 compression, or for gzip:
>
> tar zcvf dir.tar.gz dir
or, if you don't want to store additional data on your hardrive, do it
on the fly:
tar cj directory | ssh target "cd target_dir; tar xjv"
or
tar cz directory | ssh target "cd target_dir; tar xzv"
regards,
- --
Lubos
_@_"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEI54K5EqL/d2IfcARA4jNAJ47rFJtyatIvwkPEr/NZBEok/UgWQCfemhf
1VbDEKtchzm/AfWaQskJ1KU=
=VX7j
-----END PGP SIGNATURE-----
Reply to: