Why “.” is required copying a file from one directory to another directory? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionCopying a working Linux instead of installing a new onecopying files from one directory to anotherWhy does copying from a script screw with my files?Prompt when copying multiple files?Copying files containing specific text preserving directory structureHow to copy and rename file listed in TXT file?Is it possible to display a running timer in a shell script while copying a directory?Excluding specific folders while copying stuffs from one directory to anothercopy directory into another directory multiple timesCp command does an extra copying on different Ubuntu version for folder cloning
Do I really need to have a message in a novel to appeal to readers?
For a new assistant professor in CS, how to build/manage a publication pipeline
How to down pick a chord with skipped strings?
If my PI received research grants from a company to be able to pay my postdoc salary, did I have a potential conflict interest too?
Is there a holomorphic function on open unit disc with this property?
How can I use the Python library networkx from Mathematica?
Do wooden building fires get hotter than 600°C?
What does this Jacques Hadamard quote mean?
Irreducible of finite Krull dimension implies quasi-compact?
How could we fake a moon landing now?
What is homebrew?
Dating a Former Employee
Closed form of recurrent arithmetic series summation
How do I make this wiring inside cabinet safer? (Pic)
Why are there no cargo aircraft with "flying wing" design?
Would "destroying" Wurmcoil Engine prevent its tokens from being created?
Why do the resolve message appear first?
Can a new player join a group only when a new campaign starts?
Why are both D and D# fitting into my E minor key?
Can anything be seen from the center of the Boötes void? How dark would it be?
Is it common practice to audition new musicians 1-2-1 before rehearsing with the entire band?
Fundamental Solution of the Pell Equation
What is the longest distance a player character can jump in one leap?
Wu formula for manifolds with boundary
Why “.” is required copying a file from one directory to another directory?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionCopying a working Linux instead of installing a new onecopying files from one directory to anotherWhy does copying from a script screw with my files?Prompt when copying multiple files?Copying files containing specific text preserving directory structureHow to copy and rename file listed in TXT file?Is it possible to display a running timer in a shell script while copying a directory?Excluding specific folders while copying stuffs from one directory to anothercopy directory into another directory multiple timesCp command does an extra copying on different Ubuntu version for folder cloning
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
While reviewing someone's bash script, I ran into following command. My question is why "." is required for copying a file from one location to another? To me it seems unnecessary.
cp source/foo.xml destinaton/.
cp
add a comment |
While reviewing someone's bash script, I ran into following command. My question is why "." is required for copying a file from one location to another? To me it seems unnecessary.
cp source/foo.xml destinaton/.
cp
6
It is not required.
– Tigger
May 17 '17 at 3:41
1
A better question would be: Why doescprequire two arguments when copy a file from another directory to current working directory?
– hschou
May 17 '17 at 6:26
add a comment |
While reviewing someone's bash script, I ran into following command. My question is why "." is required for copying a file from one location to another? To me it seems unnecessary.
cp source/foo.xml destinaton/.
cp
While reviewing someone's bash script, I ran into following command. My question is why "." is required for copying a file from one location to another? To me it seems unnecessary.
cp source/foo.xml destinaton/.
cp
cp
edited Apr 13 at 15:02
Rui F Ribeiro
42.1k1484142
42.1k1484142
asked May 17 '17 at 3:19
DaeYoungDaeYoung
3732714
3732714
6
It is not required.
– Tigger
May 17 '17 at 3:41
1
A better question would be: Why doescprequire two arguments when copy a file from another directory to current working directory?
– hschou
May 17 '17 at 6:26
add a comment |
6
It is not required.
– Tigger
May 17 '17 at 3:41
1
A better question would be: Why doescprequire two arguments when copy a file from another directory to current working directory?
– hschou
May 17 '17 at 6:26
6
6
It is not required.
– Tigger
May 17 '17 at 3:41
It is not required.
– Tigger
May 17 '17 at 3:41
1
1
A better question would be: Why does
cp require two arguments when copy a file from another directory to current working directory?– hschou
May 17 '17 at 6:26
A better question would be: Why does
cp require two arguments when copy a file from another directory to current working directory?– hschou
May 17 '17 at 6:26
add a comment |
1 Answer
1
active
oldest
votes
The dot (.) is not required.
You can use the following syntax as well:
cp source/foo.xml destination/
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%2f365524%2fwhy-is-required-copying-a-file-from-one-directory-to-another-directory%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
The dot (.) is not required.
You can use the following syntax as well:
cp source/foo.xml destination/
add a comment |
The dot (.) is not required.
You can use the following syntax as well:
cp source/foo.xml destination/
add a comment |
The dot (.) is not required.
You can use the following syntax as well:
cp source/foo.xml destination/
The dot (.) is not required.
You can use the following syntax as well:
cp source/foo.xml destination/
edited May 17 '17 at 7:06
dr01
16.3k115475
16.3k115475
answered May 17 '17 at 5:28
shasshas
67131027
67131027
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%2f365524%2fwhy-is-required-copying-a-file-from-one-directory-to-another-directory%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
6
It is not required.
– Tigger
May 17 '17 at 3:41
1
A better question would be: Why does
cprequire two arguments when copy a file from another directory to current working directory?– hschou
May 17 '17 at 6:26