âtar ./files.tar -C $HOMEâ results in a âtar: invalid option â .â error

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm trying to run a tar command and I keep getting this odd error.
The command:
tar ./files.tar -C $HOME
And I get this in return:
Error: tar: invalid option -- '.'
My files.tar folder is located correctly near my script and contains some directories.
Any ideas?
tar
add a comment |Â
up vote
0
down vote
favorite
I'm trying to run a tar command and I keep getting this odd error.
The command:
tar ./files.tar -C $HOME
And I get this in return:
Error: tar: invalid option -- '.'
My files.tar folder is located correctly near my script and contains some directories.
Any ideas?
tar
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to run a tar command and I keep getting this odd error.
The command:
tar ./files.tar -C $HOME
And I get this in return:
Error: tar: invalid option -- '.'
My files.tar folder is located correctly near my script and contains some directories.
Any ideas?
tar
I'm trying to run a tar command and I keep getting this odd error.
The command:
tar ./files.tar -C $HOME
And I get this in return:
Error: tar: invalid option -- '.'
My files.tar folder is located correctly near my script and contains some directories.
Any ideas?
tar
edited Oct 16 '17 at 13:10
Jeff Schaller
32.1k849109
32.1k849109
asked Oct 16 '17 at 11:46
Wolfyaskingstuff
113
113
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
Add the options before the file name and so:
tar -xf files.tar -C $HOME
This just returns another error: tar: "C: Cannot open: No such file or directory"
â Wolfyaskingstuff
Oct 16 '17 at 11:55
Are you trying to extract the tar file files.tar?
â Raman Sailopal
Oct 16 '17 at 11:56
2
The order ofxandfmust match the order of the arguments they are referring to. Sotar xfC files.tar $HOME.
â Johan Myréen
Oct 16 '17 at 11:57
Yes I am. But extract them in the home directory.
â Wolfyaskingstuff
Oct 16 '17 at 11:57
@JohanMyréen That worked!
â Wolfyaskingstuff
Oct 16 '17 at 11:59
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Add the options before the file name and so:
tar -xf files.tar -C $HOME
This just returns another error: tar: "C: Cannot open: No such file or directory"
â Wolfyaskingstuff
Oct 16 '17 at 11:55
Are you trying to extract the tar file files.tar?
â Raman Sailopal
Oct 16 '17 at 11:56
2
The order ofxandfmust match the order of the arguments they are referring to. Sotar xfC files.tar $HOME.
â Johan Myréen
Oct 16 '17 at 11:57
Yes I am. But extract them in the home directory.
â Wolfyaskingstuff
Oct 16 '17 at 11:57
@JohanMyréen That worked!
â Wolfyaskingstuff
Oct 16 '17 at 11:59
add a comment |Â
up vote
3
down vote
accepted
Add the options before the file name and so:
tar -xf files.tar -C $HOME
This just returns another error: tar: "C: Cannot open: No such file or directory"
â Wolfyaskingstuff
Oct 16 '17 at 11:55
Are you trying to extract the tar file files.tar?
â Raman Sailopal
Oct 16 '17 at 11:56
2
The order ofxandfmust match the order of the arguments they are referring to. Sotar xfC files.tar $HOME.
â Johan Myréen
Oct 16 '17 at 11:57
Yes I am. But extract them in the home directory.
â Wolfyaskingstuff
Oct 16 '17 at 11:57
@JohanMyréen That worked!
â Wolfyaskingstuff
Oct 16 '17 at 11:59
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Add the options before the file name and so:
tar -xf files.tar -C $HOME
Add the options before the file name and so:
tar -xf files.tar -C $HOME
edited Oct 16 '17 at 12:01
answered Oct 16 '17 at 11:51
Raman Sailopal
1,18117
1,18117
This just returns another error: tar: "C: Cannot open: No such file or directory"
â Wolfyaskingstuff
Oct 16 '17 at 11:55
Are you trying to extract the tar file files.tar?
â Raman Sailopal
Oct 16 '17 at 11:56
2
The order ofxandfmust match the order of the arguments they are referring to. Sotar xfC files.tar $HOME.
â Johan Myréen
Oct 16 '17 at 11:57
Yes I am. But extract them in the home directory.
â Wolfyaskingstuff
Oct 16 '17 at 11:57
@JohanMyréen That worked!
â Wolfyaskingstuff
Oct 16 '17 at 11:59
add a comment |Â
This just returns another error: tar: "C: Cannot open: No such file or directory"
â Wolfyaskingstuff
Oct 16 '17 at 11:55
Are you trying to extract the tar file files.tar?
â Raman Sailopal
Oct 16 '17 at 11:56
2
The order ofxandfmust match the order of the arguments they are referring to. Sotar xfC files.tar $HOME.
â Johan Myréen
Oct 16 '17 at 11:57
Yes I am. But extract them in the home directory.
â Wolfyaskingstuff
Oct 16 '17 at 11:57
@JohanMyréen That worked!
â Wolfyaskingstuff
Oct 16 '17 at 11:59
This just returns another error: tar: "C: Cannot open: No such file or directory"
â Wolfyaskingstuff
Oct 16 '17 at 11:55
This just returns another error: tar: "C: Cannot open: No such file or directory"
â Wolfyaskingstuff
Oct 16 '17 at 11:55
Are you trying to extract the tar file files.tar?
â Raman Sailopal
Oct 16 '17 at 11:56
Are you trying to extract the tar file files.tar?
â Raman Sailopal
Oct 16 '17 at 11:56
2
2
The order of
x and f must match the order of the arguments they are referring to. So tar xfC files.tar $HOME.â Johan Myréen
Oct 16 '17 at 11:57
The order of
x and f must match the order of the arguments they are referring to. So tar xfC files.tar $HOME.â Johan Myréen
Oct 16 '17 at 11:57
Yes I am. But extract them in the home directory.
â Wolfyaskingstuff
Oct 16 '17 at 11:57
Yes I am. But extract them in the home directory.
â Wolfyaskingstuff
Oct 16 '17 at 11:57
@JohanMyréen That worked!
â Wolfyaskingstuff
Oct 16 '17 at 11:59
@JohanMyréen That worked!
â Wolfyaskingstuff
Oct 16 '17 at 11:59
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f398388%2ftar-files-tar-c-home-results-in-a-tar-invalid-option-error%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password