Deutsch   English   Français   Italiano  
<v47v3e$etuo$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Lew Pitcher <lew.pitcher@digitalfreehold.ca>
Newsgroups: comp.os.linux.misc
Subject: Re: tar problem
Date: Mon, 10 Jun 2024 22:35:26 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 78
Message-ID: <v47v3e$etuo$2@dont-email.me>
References: <v44em0$3i8j8$1@dont-email.me>
	<wwvo78auj35.fsf@LkoBDZeT.terraraq.uk>
	<F_OdnckCE_opY_j7nZ2dnZfqn_udnZ2d@giganews.com>
	<v46oc6$dn9v$1@dont-email.me> <v46ruq$etuo$1@dont-email.me>
	<lcp7qiF3bnqU2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 11 Jun 2024 00:35:26 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d91e50d1a29be9d3e7c14e757d2df79e";
	logging-data="489432"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/I+C71ykZZP7BWLlmWilzISqQwMqUHUIE="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
 git://git.gnome.org/pan2)
Cancel-Lock: sha1:iMvvumetI++A/G6PSrjx+mtkA1w=
Bytes: 4008

On Mon, 10 Jun 2024 23:00:02 +0200, Carlos E. R. wrote:

> On 2024-06-10 14:35, Lew Pitcher wrote:
>> On Mon, 10 Jun 2024 11:34:30 +0000, db wrote:
>> 
>>> On Sun, 09 Jun 2024 19:12:52 +0000, Robert Heller wrote:
>>>
>>>> At Sun, 09 Jun 2024 18:22:38 +0100 Richard Kettlewell
>>>> <invalid@invalid.invalid> wrote:
>>>>
>>>>
>>>>> db <dieterhansbritz@gmail.com> writes:
>>>>>> 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
>>>>>> ~/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
>>>>>>
>>>>>> Why doesn't it work from bin/ ?
>>>>
>>>> What does 'which tarx' show?  Does it show /bin/tarx?
>>>>
>>>> Note: you should *never* put random programs in /bin (or even /usr/bin).
>>>>   The only programs/files in these directories should be ones installed
>>>> by your package management system.  /bin is reserved for core / early
>>>> boot programs and others would be in /usr/bin.
>>>>
>>>> Locally provided programs should be in either /usr/local/bin or /opt/bin
>>>> (depending on your file system usage philosiphy).  These directories
>>>> can/should be added to your $PATH.  *Personally* provided programs
>>>> should be in $HOME/bin, and this directory can be added to your $PATH as
>>>> well.
>>>>
>>>>
>>>>> Probably /bin/tarx isn't the same as ./tarx. What does
>>>>>    cat /bin/tarx
>>>>> show?
>>>>>
>>>
>>> I already showed that, the two cat.. statements.
>> 
>> Sorry, but no, you didn't.
>> 
>> You showed us
>>    ~/tartest> cat tarx
>> which gave the contents of ~/tartest/tarx, and
>>    ~/tartest> cat ~/bin/tarx
>> which gave the contents of ~/bin/tarx
>> 
>> You haven't shown the contents of /bin/tarx
> 
> There is no proof that such a file exists.

Agreed. However, the OP asserts that he (quote)
>>>>>> copied it into the /bin directory
and gives an example where he executes it from
(presumably, the /bin directory) in his path.



>> Nor have you shown that there is no other version of your
>> tarx script in your PATH.
> 
> That is the question to ask first :-)

That's the question I /did/ ask first :-)

-- 
Lew Pitcher
"In Skills We Trust"