Untar an archive in the directory it is currently at (without noting destination path)Extrat tar “Cannot...
How to tell someone I'd like to become friends without letting them think I'm romantically interested in them?
Which star / galaxy is moving away from us the fastest?
How do native German speakers usually express skepticism (using even) about a premise?
Why isn't pressure filtration popular compared to vacuum filtration?
Was I subtly told to resign?
What to do with a rabbit in a survival situation?
What is the measurable difference between dry basil and fresh?
When an electron changes its spin, or any other intrinsic property, is it still the same electron?
Switching interface VLAN ID Mid-Production
When I press the space bar it deletes the letters after it
How can a dictatorship government be beneficial to a dictator in a post-scarcity society?
The tensor product of two monoidal categories
Why would non-kinetic weapons be used for orbital bombardment?
Why was hardware diversification an asset for the IBM PC ecosystem?
Optimization terminology: "Exact" v. "Approximate"
Why do we need common sense in AI?
How to befriend private nested class
How do we handle pauses in a dialogue?
What's the point of having a RAID 1 configuration over incremental backups to a secondary drive?
Credit score and financing new car
What steps should I take to lawfully visit the United States as a tourist immediately after visiting on a B-1 visa?
Is "De qui parles-tu" (for example) as formal as it is in English, or is it normal for the French to casually say that
Salt, pepper, herbs and spices
Why do people keep referring to Leia as Princess Leia, even after the destruction of Alderaan?
Untar an archive in the directory it is currently at (without noting destination path)
Extrat tar “Cannot open: File name too long”Untar Without Top-Level DirectoryHow to download an archive and extract it without saving the archive to disk?How to extract a single file from tbzhow to add files from a folder to archive instead of the folders itself?How to untar safely, without polluting the current directory in case of a tarbomb?Untar subfolders with initial folder's content in linuxHow to prepend a directory to files placed in a tar archive?Remove the pathname when extracting and archiving files that end with .log from /var/logFind tar archives inside subdirectories with bash script
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
While in ~/public_html
I ran:
tar -zxvf example.com/extensions/MobileFrontend-REL1_32-9b48b3c.tar.gz
I assumed the untarred directory (named MobileFrontend
) would appear under example.com/extensions
(the directory in which its archive is currently at) but instead it appeared in ~/public_html
.
How to untar an archive in the directory it is currently at (without noting destination path)?
tar
add a comment |
While in ~/public_html
I ran:
tar -zxvf example.com/extensions/MobileFrontend-REL1_32-9b48b3c.tar.gz
I assumed the untarred directory (named MobileFrontend
) would appear under example.com/extensions
(the directory in which its archive is currently at) but instead it appeared in ~/public_html
.
How to untar an archive in the directory it is currently at (without noting destination path)?
tar
Some versions oftar
have a-C directory
option that changes the directory. You can use this and thedirname
command to produceextract(){ local t=$1; shift ; tar -zxvf "$t" -C "$(dirname "$t")" "$@" ; }
but I wouldn't bother unless I was doing it a lot
– icarus
41 mins ago
add a comment |
While in ~/public_html
I ran:
tar -zxvf example.com/extensions/MobileFrontend-REL1_32-9b48b3c.tar.gz
I assumed the untarred directory (named MobileFrontend
) would appear under example.com/extensions
(the directory in which its archive is currently at) but instead it appeared in ~/public_html
.
How to untar an archive in the directory it is currently at (without noting destination path)?
tar
While in ~/public_html
I ran:
tar -zxvf example.com/extensions/MobileFrontend-REL1_32-9b48b3c.tar.gz
I assumed the untarred directory (named MobileFrontend
) would appear under example.com/extensions
(the directory in which its archive is currently at) but instead it appeared in ~/public_html
.
How to untar an archive in the directory it is currently at (without noting destination path)?
tar
tar
edited 35 mins ago
JohnDoea
asked 1 hour ago
JohnDoeaJohnDoea
461 gold badge11 silver badges42 bronze badges
461 gold badge11 silver badges42 bronze badges
Some versions oftar
have a-C directory
option that changes the directory. You can use this and thedirname
command to produceextract(){ local t=$1; shift ; tar -zxvf "$t" -C "$(dirname "$t")" "$@" ; }
but I wouldn't bother unless I was doing it a lot
– icarus
41 mins ago
add a comment |
Some versions oftar
have a-C directory
option that changes the directory. You can use this and thedirname
command to produceextract(){ local t=$1; shift ; tar -zxvf "$t" -C "$(dirname "$t")" "$@" ; }
but I wouldn't bother unless I was doing it a lot
– icarus
41 mins ago
Some versions of
tar
have a -C directory
option that changes the directory. You can use this and the dirname
command to produce extract(){ local t=$1; shift ; tar -zxvf "$t" -C "$(dirname "$t")" "$@" ; }
but I wouldn't bother unless I was doing it a lot– icarus
41 mins ago
Some versions of
tar
have a -C directory
option that changes the directory. You can use this and the dirname
command to produce extract(){ local t=$1; shift ; tar -zxvf "$t" -C "$(dirname "$t")" "$@" ; }
but I wouldn't bother unless I was doing it a lot– icarus
41 mins ago
add a comment |
1 Answer
1
active
oldest
votes
You'd have to change to that directory or specify it with -C
. Tar extracts to the current directory by default.
cd example.com/extensions ; tar -zxvf ./MobileFrontend-REL1_32-9b48b3c.tar.gz
or
tar -zxv -C example.com/extensions -f example.com/extensions/MobileFrontend-REL1_32-9b48b3c.tar.gz
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f529313%2funtar-an-archive-in-the-directory-it-is-currently-at-without-noting-destination%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You'd have to change to that directory or specify it with -C
. Tar extracts to the current directory by default.
cd example.com/extensions ; tar -zxvf ./MobileFrontend-REL1_32-9b48b3c.tar.gz
or
tar -zxv -C example.com/extensions -f example.com/extensions/MobileFrontend-REL1_32-9b48b3c.tar.gz
add a comment |
You'd have to change to that directory or specify it with -C
. Tar extracts to the current directory by default.
cd example.com/extensions ; tar -zxvf ./MobileFrontend-REL1_32-9b48b3c.tar.gz
or
tar -zxv -C example.com/extensions -f example.com/extensions/MobileFrontend-REL1_32-9b48b3c.tar.gz
add a comment |
You'd have to change to that directory or specify it with -C
. Tar extracts to the current directory by default.
cd example.com/extensions ; tar -zxvf ./MobileFrontend-REL1_32-9b48b3c.tar.gz
or
tar -zxv -C example.com/extensions -f example.com/extensions/MobileFrontend-REL1_32-9b48b3c.tar.gz
You'd have to change to that directory or specify it with -C
. Tar extracts to the current directory by default.
cd example.com/extensions ; tar -zxvf ./MobileFrontend-REL1_32-9b48b3c.tar.gz
or
tar -zxv -C example.com/extensions -f example.com/extensions/MobileFrontend-REL1_32-9b48b3c.tar.gz
answered 39 mins ago
L. Scott JohnsonL. Scott Johnson
4141 silver badge8 bronze badges
4141 silver badge8 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f529313%2funtar-an-archive-in-the-directory-it-is-currently-at-without-noting-destination%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Some versions of
tar
have a-C directory
option that changes the directory. You can use this and thedirname
command to produceextract(){ local t=$1; shift ; tar -zxvf "$t" -C "$(dirname "$t")" "$@" ; }
but I wouldn't bother unless I was doing it a lot– icarus
41 mins ago