Sujet : Re: tar problem
De : dieterhansbritz (at) *nospam* gmail.com (db)
Groupes : comp.os.linux.miscDate : 12. Jun 2024, 14:41:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v4c522$1ld54$3@dont-email.me>
References : 1 2
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
On Mon, 10 Jun 2024 22:56:55 -0000 (UTC), Lew Pitcher wrote:
On Sun, 09 Jun 2024 14:36:49 +0000, db wrote:
I like to make life easy so I wrote a one-line script for extracting
the contents of a tar file. I copied it into the /bin directory so I
can run it from anywhere.
I tried it out in a test directory where I had it, and where there is a
small test tar file. Here is the dialogue from running it, using both
the local script and the one in /bin:
~/tartest> ls tarx test.tar.gz ~/tartest> cat tarx tar -xf $1.tar.gz
~/tartest> cat ~/bin/tarx tar -xf $1.tar.gz ~/tartest> ./tarx test
~/tartest> ls tarx test test.tar.gz ~/tartest> del -r test
Is this a homegrown command, or does your distribution supply it?
FWIW, "del" is not a standard Unix or Linux command, and (AFAIK) does
not exist as a builtin in any Unix/Linux shell.
~/tartest> tarx test tar (child): test: Cannot open: No such file or
directory tar (child): Error is not recoverable: exiting now tar: Child
returned status 2 tar: Error is not recoverable: exiting now
The error message implies that a) tar can't find an input file called
"test", and b) that your tarx command doesn't expand it's argument
into a filename that tar /can/ find.
Why doesn't it work from bin/ ?
What shell do you use?
Do you have an alias set for tar or tarx?
del is an alias for rm -i, saving me that onerous -i {;]
bash, under Kubuntu
No alias set for tar or tarx
-- db