TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:1885] Redirection of a tar file



The > redirects standard output (what you would see on the screen) to a
file.  So, the command below is trying to write a bunch of filenames to a
file called somedirectory.  Apparently when WindoesN'T tried to copy I/O
redirection from the Unix shells they didn't end up with an exact copy.
Un-tarring to a directory is not the expected behavior for stdout
redirection.
Try this: 

tar -xvf somefile.tar -C /opt/somedirectory


On Thu, 22 Oct 1998, Perry Hoekstra wrote:

> Greet the sun all,
> 
> How do you redirect the output of a tar extraction.  If it can be done
> in NT, I know it can be done in Linux. I have looked in the man pages
> and a couple of books with no luck.  Essentially, I want to:
> 
> tar -xvf sometarfile.tar > /opt/somedirectory
> 
> where the > is some type of pipe command to place the files relative,
> not to the current directory, but the one I specify.