Issues with tar, âremove leading /â and the --file option [duplicate]
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
This question already has an answer here:
tar: Removing leading `/' from member names
7 answers
When I specify root-folders in my tar command-line I deliberately prefix with "/" to tell tar it is root-folders and not sub-folders of current folder.
E.g.
tar --create --file="/tmp/test.tar" "/tmp/Folder 1/"
tar: Removing leading `/' from member names
Why is the leading "/" removed?
In regards to the -f
/ --file=
option:
If you want to output to stdout you use -f -
but it seems you cannot use --file= -
.
I thought -f
and --file
were aliases to each other?
Beside I cannot find the -f -
option in the manual (man tar)...shouldn't it be there? or have I just overlooked it.
tar
marked as duplicate by harish.venkat, Jesse_b, G-Man, Jeff Schaller, Vlastimil May 3 at 6:30
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
up vote
1
down vote
favorite
This question already has an answer here:
tar: Removing leading `/' from member names
7 answers
When I specify root-folders in my tar command-line I deliberately prefix with "/" to tell tar it is root-folders and not sub-folders of current folder.
E.g.
tar --create --file="/tmp/test.tar" "/tmp/Folder 1/"
tar: Removing leading `/' from member names
Why is the leading "/" removed?
In regards to the -f
/ --file=
option:
If you want to output to stdout you use -f -
but it seems you cannot use --file= -
.
I thought -f
and --file
were aliases to each other?
Beside I cannot find the -f -
option in the manual (man tar)...shouldn't it be there? or have I just overlooked it.
tar
marked as duplicate by harish.venkat, Jesse_b, G-Man, Jeff Schaller, Vlastimil May 3 at 6:30
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
@BMWW If you ask two questions in one, it can happen it will get closed as duplicate, altough only one of the questions has been answered before.
â Philippos
May 2 at 15:42
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
This question already has an answer here:
tar: Removing leading `/' from member names
7 answers
When I specify root-folders in my tar command-line I deliberately prefix with "/" to tell tar it is root-folders and not sub-folders of current folder.
E.g.
tar --create --file="/tmp/test.tar" "/tmp/Folder 1/"
tar: Removing leading `/' from member names
Why is the leading "/" removed?
In regards to the -f
/ --file=
option:
If you want to output to stdout you use -f -
but it seems you cannot use --file= -
.
I thought -f
and --file
were aliases to each other?
Beside I cannot find the -f -
option in the manual (man tar)...shouldn't it be there? or have I just overlooked it.
tar
This question already has an answer here:
tar: Removing leading `/' from member names
7 answers
When I specify root-folders in my tar command-line I deliberately prefix with "/" to tell tar it is root-folders and not sub-folders of current folder.
E.g.
tar --create --file="/tmp/test.tar" "/tmp/Folder 1/"
tar: Removing leading `/' from member names
Why is the leading "/" removed?
In regards to the -f
/ --file=
option:
If you want to output to stdout you use -f -
but it seems you cannot use --file= -
.
I thought -f
and --file
were aliases to each other?
Beside I cannot find the -f -
option in the manual (man tar)...shouldn't it be there? or have I just overlooked it.
This question already has an answer here:
tar: Removing leading `/' from member names
7 answers
tar
edited May 2 at 18:28
Hauke Laging
53.2k1282130
53.2k1282130
asked May 2 at 15:10
BMWW
436
436
marked as duplicate by harish.venkat, Jesse_b, G-Man, Jeff Schaller, Vlastimil May 3 at 6:30
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by harish.venkat, Jesse_b, G-Man, Jeff Schaller, Vlastimil May 3 at 6:30
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
@BMWW If you ask two questions in one, it can happen it will get closed as duplicate, altough only one of the questions has been answered before.
â Philippos
May 2 at 15:42
add a comment |Â
1
@BMWW If you ask two questions in one, it can happen it will get closed as duplicate, altough only one of the questions has been answered before.
â Philippos
May 2 at 15:42
1
1
@BMWW If you ask two questions in one, it can happen it will get closed as duplicate, altough only one of the questions has been answered before.
â Philippos
May 2 at 15:42
@BMWW If you ask two questions in one, it can happen it will get closed as duplicate, altough only one of the questions has been answered before.
â Philippos
May 2 at 15:42
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
Tar writes to stdout or reads from stdin by default, so there is no need for the dash character to mean stdout/stdin. Just leave out the -f
parameter. You got a syntax error for --file= -
because of the space between =
and -
. Long options with --
are written --param=value
without spaces around the equals sign.
add a comment |Â
up vote
1
down vote
Try to avoid using full path when specifying the directory path, use relative path, it will be easier when restoring.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Tar writes to stdout or reads from stdin by default, so there is no need for the dash character to mean stdout/stdin. Just leave out the -f
parameter. You got a syntax error for --file= -
because of the space between =
and -
. Long options with --
are written --param=value
without spaces around the equals sign.
add a comment |Â
up vote
2
down vote
Tar writes to stdout or reads from stdin by default, so there is no need for the dash character to mean stdout/stdin. Just leave out the -f
parameter. You got a syntax error for --file= -
because of the space between =
and -
. Long options with --
are written --param=value
without spaces around the equals sign.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Tar writes to stdout or reads from stdin by default, so there is no need for the dash character to mean stdout/stdin. Just leave out the -f
parameter. You got a syntax error for --file= -
because of the space between =
and -
. Long options with --
are written --param=value
without spaces around the equals sign.
Tar writes to stdout or reads from stdin by default, so there is no need for the dash character to mean stdout/stdin. Just leave out the -f
parameter. You got a syntax error for --file= -
because of the space between =
and -
. Long options with --
are written --param=value
without spaces around the equals sign.
answered May 2 at 15:50
Johan Myréen
6,76711221
6,76711221
add a comment |Â
add a comment |Â
up vote
1
down vote
Try to avoid using full path when specifying the directory path, use relative path, it will be easier when restoring.
add a comment |Â
up vote
1
down vote
Try to avoid using full path when specifying the directory path, use relative path, it will be easier when restoring.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Try to avoid using full path when specifying the directory path, use relative path, it will be easier when restoring.
Try to avoid using full path when specifying the directory path, use relative path, it will be easier when restoring.
edited May 17 at 13:54
answered May 2 at 18:41
José Castillo Lema
25119
25119
add a comment |Â
add a comment |Â
1
@BMWW If you ask two questions in one, it can happen it will get closed as duplicate, altough only one of the questions has been answered before.
â Philippos
May 2 at 15:42