bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

argument '-C' | question


From: Ricky Tigg
Subject: argument '-C' | question
Date: Thu, 16 Feb 2023 15:57:55 +0200

Hello.

Assumed conditions:
$ pwd
/home/<$USER>
$ ls -d
DD


A script working properly contains those strings of code:
tar -xvf DD/00.tar.xz -C DD
tar -xvf DD/01.tar.xz -C DD


As it appears those strings don't have tar command options that follow '-C DD', which then are indications that there does not exist subject to be affected in each string. Since the task of '-C' is to change into directory, as i understand the way 'cd DIR' does, i wonder may those strings respectively equal as follows

tar -xvf DD/00.tar.xz
cd DD

and

tar -xvf DD/01.tar.xz
cd DD


However after

tar -xvf DD/00.tar.xz
cd DD


we would have

$ pwd
/home/<$USER>/DD


Thus, this would make 'tar -xvf DD/01.tar.xz' unable to find 01.tar.xz.

Despite i understand the sentence in TAR(1), Change to DIR before performing any operations. This option is order-sensitive, i.e. it affects all options that follow., i don't comprehend what it is intended to mean to non-developer readers, which i am. I would appreciate if i could receive a definition that would make me comprehend. Regards.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]