Installing Tar

Swapneel Patnekar linux at eth1.in
Sun Dec 13 19:20:14 UTC 2009


>
> I tend to create a directory and perform one of the above actions from
> within that directory, because I find that some tar files just dump their
> extracted files in the current directory. This can be rather messy if the
> current directory contains a lot of files. Most tar files don't behave
> like this, but I like to play safe.
>
> - Richard.
>
You can use the 't' option/flag of tar to determine if the archive 
contains a folder and all files/folders inside it or
if it does not have such a directory hierarchy.

tar tvzf archive.tar.gz
tar tvjf archive.tar.bz2
tar tvf archive.tar

Cheers !





More information about the ubuntu-users mailing list