How does cp -a work Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How does one open a .RTA file?How do I find and copy an arbitrary list of files in terminal?how to copy a file to the desktopHow to copy files from a dead Ubuntu 12.04How to copy only files (.wrk) from multiple directories and subfolders16.04 - Copy Dialog disappears and nothing seems to workcopy does not work in gnome-shelldoes linux docker work better on particular file type?Nature of Permissions - Copy Fails on my Own FilesHow do I copy only files that overwrite others in a directory
Should I use Javascript Classes or Apex Classes in Lightning Web Components?
Should I call the interviewer directly, if HR aren't responding?
Is high blood pressure ever a symptom attributable solely to dehydration?
3 doors, three guards, one stone
Single word antonym of "flightless"
Do I really need recursive chmod to restrict access to a folder?
Alternate inner products on Euclidean space?
Is there a documented rationale why the House Ways and Means chairman can demand tax info?
What are the motives behind Cersei's orders given to Bronn?
Bonus calculation: Am I making a mountain out of a molehill?
Should gear shift center itself while in neutral?
How can I make names more distinctive without making them longer?
Precipitating silver(I) salts from the solution of barium(II) cyanate and iodide
macOS-like app switching in Plasma 5
Why was the term "discrete" used in discrete logarithm?
How to draw this diagram using TikZ package?
What happens to sewage if there is no river near by?
Models of set theory where not every set can be linearly ordered
Does polymorph use a PC’s CR or its level?
Is there a way in Ruby to make just any one out of many keyword arguments required?
Area of a 2D convex hull
What do you call a plan that's an alternative plan in case your initial plan fails?
What causes the vertical darker bands in my photo?
How is the internal pullup resistor in a microcontroller wired?
How does cp -a work
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How does one open a .RTA file?How do I find and copy an arbitrary list of files in terminal?how to copy a file to the desktopHow to copy files from a dead Ubuntu 12.04How to copy only files (.wrk) from multiple directories and subfolders16.04 - Copy Dialog disappears and nothing seems to workcopy does not work in gnome-shelldoes linux docker work better on particular file type?Nature of Permissions - Copy Fails on my Own FilesHow do I copy only files that overwrite others in a directory
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to understand linux and working through some tutorials. One states that I can copy files to the current directory by using a cp -a command with a relative pathname such as
cp -a ../somedir/.
It fails each time I run it. Is the syntax incorrect?
I tried the man page, but it didn't seem to find anything that answers my question.
files copy
New contributor
NodeNewb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I am trying to understand linux and working through some tutorials. One states that I can copy files to the current directory by using a cp -a command with a relative pathname such as
cp -a ../somedir/.
It fails each time I run it. Is the syntax incorrect?
I tried the man page, but it didn't seem to find anything that answers my question.
files copy
New contributor
NodeNewb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
you are missing a blank space between somedir and the last dot. See vidarlo 's answer, it is correct. Upvote it! Accept it!
– Henrique
1 hour ago
Also something I wish I had known a whole lot earlier when learning Linux & bash is that you can press tab to get autocomplete; press it twice for suggestions.
– rm-vanda
1 hour ago
add a comment |
I am trying to understand linux and working through some tutorials. One states that I can copy files to the current directory by using a cp -a command with a relative pathname such as
cp -a ../somedir/.
It fails each time I run it. Is the syntax incorrect?
I tried the man page, but it didn't seem to find anything that answers my question.
files copy
New contributor
NodeNewb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I am trying to understand linux and working through some tutorials. One states that I can copy files to the current directory by using a cp -a command with a relative pathname such as
cp -a ../somedir/.
It fails each time I run it. Is the syntax incorrect?
I tried the man page, but it didn't seem to find anything that answers my question.
files copy
files copy
New contributor
NodeNewb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
NodeNewb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 1 hour ago
zx485
1,47131315
1,47131315
New contributor
NodeNewb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 hours ago
NodeNewbNodeNewb
111
111
New contributor
NodeNewb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
NodeNewb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
NodeNewb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
you are missing a blank space between somedir and the last dot. See vidarlo 's answer, it is correct. Upvote it! Accept it!
– Henrique
1 hour ago
Also something I wish I had known a whole lot earlier when learning Linux & bash is that you can press tab to get autocomplete; press it twice for suggestions.
– rm-vanda
1 hour ago
add a comment |
you are missing a blank space between somedir and the last dot. See vidarlo 's answer, it is correct. Upvote it! Accept it!
– Henrique
1 hour ago
Also something I wish I had known a whole lot earlier when learning Linux & bash is that you can press tab to get autocomplete; press it twice for suggestions.
– rm-vanda
1 hour ago
you are missing a blank space between somedir and the last dot. See vidarlo 's answer, it is correct. Upvote it! Accept it!
– Henrique
1 hour ago
you are missing a blank space between somedir and the last dot. See vidarlo 's answer, it is correct. Upvote it! Accept it!
– Henrique
1 hour ago
Also something I wish I had known a whole lot earlier when learning Linux & bash is that you can press tab to get autocomplete; press it twice for suggestions.
– rm-vanda
1 hour ago
Also something I wish I had known a whole lot earlier when learning Linux & bash is that you can press tab to get autocomplete; press it twice for suggestions.
– rm-vanda
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
cp -a ../somedir/. is wrong. The general syntax is
cp source target
You only specified one argument. To copy something to current directory, you can run
cp ../somedir .
Note the space before the dot. . is shorthand for current directory. .. is shorthand for parent directory.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
);
);
NodeNewb is a new contributor. Be nice, and check out our Code of Conduct.
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%2faskubuntu.com%2fquestions%2f1134176%2fhow-does-cp-a-work%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
cp -a ../somedir/. is wrong. The general syntax is
cp source target
You only specified one argument. To copy something to current directory, you can run
cp ../somedir .
Note the space before the dot. . is shorthand for current directory. .. is shorthand for parent directory.
add a comment |
cp -a ../somedir/. is wrong. The general syntax is
cp source target
You only specified one argument. To copy something to current directory, you can run
cp ../somedir .
Note the space before the dot. . is shorthand for current directory. .. is shorthand for parent directory.
add a comment |
cp -a ../somedir/. is wrong. The general syntax is
cp source target
You only specified one argument. To copy something to current directory, you can run
cp ../somedir .
Note the space before the dot. . is shorthand for current directory. .. is shorthand for parent directory.
cp -a ../somedir/. is wrong. The general syntax is
cp source target
You only specified one argument. To copy something to current directory, you can run
cp ../somedir .
Note the space before the dot. . is shorthand for current directory. .. is shorthand for parent directory.
answered 2 hours ago
vidarlovidarlo
10.7k52852
10.7k52852
add a comment |
add a comment |
NodeNewb is a new contributor. Be nice, and check out our Code of Conduct.
NodeNewb is a new contributor. Be nice, and check out our Code of Conduct.
NodeNewb is a new contributor. Be nice, and check out our Code of Conduct.
NodeNewb is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f1134176%2fhow-does-cp-a-work%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
you are missing a blank space between somedir and the last dot. See vidarlo 's answer, it is correct. Upvote it! Accept it!
– Henrique
1 hour ago
Also something I wish I had known a whole lot earlier when learning Linux & bash is that you can press tab to get autocomplete; press it twice for suggestions.
– rm-vanda
1 hour ago