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

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

How can whole tone melodies sound more interesting?

Does polymorph use a PC’s CR or its level?

What are the motives behind Cersei's orders given to Bronn?

If Jon Snow became King of the Seven Kingdoms what would his regnal number be?

Can Pao de Queijo, and similar foods, be kosher for Passover?

What are the pros and cons of Aerospike nosecones?

3 doors, three guards, one stone

Do you forfeit tax refunds/credits if you aren't required to and don't file by April 15?

Does accepting a pardon have any bearing on trying that person for the same crime in a sovereign jurisdiction?

How to motivate offshore teams and trust them to deliver?

List numbering with letters

How can I make names more distinctive without making them longer?

Alternate inner products on Euclidean space?

Sorting numerically

What's the purpose of writing one's academic bio in 3rd person?

Is it possible to boil a liquid by just mixing many immiscible liquids together?

What makes black pepper strong or mild?

If a contract sometimes uses the wrong name, is it still valid?

Precipitating silver(I) salts from the solution of barium(II) cyanate and iodide

Should I call the interviewer directly, if HR aren't responding?

How was the dust limit of 546 satoshis was chosen? Why not 550 satoshis?

Is it true that "carbohydrates are of no use for the basal metabolic need"?

Is there a documented rationale why the House Ways and Means chairman can demand tax info?



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;








2















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.










share|improve this question









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

















2















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.










share|improve this question









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













2












2








2








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.










share|improve this question









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






share|improve this question









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.











share|improve this question









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.









share|improve this question




share|improve this question








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

















  • 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










1 Answer
1






active

oldest

votes


















4














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.






share|improve this answer























    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.









    draft saved

    draft discarded


















    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









    4














    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.






    share|improve this answer



























      4














      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.






      share|improve this answer

























        4












        4








        4







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        vidarlovidarlo

        10.7k52852




        10.7k52852




















            NodeNewb is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Era Viking Índice Início da Era Viquingue | Cotidiano | Sociedade | Língua | Religião | A arte | As primeiras cidades | As viagens dos viquingues | Viquingues do Oeste e Leste | Fim da Era Viquingue | Fontes históricas | Referências Bibliografia | Ligações externas | Menu de navegação«Sverige då!»«Handel I vikingetid»«O que é Nórdico Antigo»Mito, magia e religião na volsunga saga Um olhar sobre a trajetória mítica do herói sigurd«Bonden var den verklige vikingen»«Vikingatiden»«Vikingatiden»«Vinland»«Guerreiras de Óðinn: As Valkyrjor na Mitologia Viking»1519-9053«Esculpindo símbolos e seres: A arte viking em pedras rúnicas»1679-9313Historia - Tema: VikingarnaAventura e Magia no Mundo das Sagas IslandesasEra Vikinge

            What's the metal clinking sound at the end of credits in Avengers: Endgame?What makes Thanos so strong in Avengers: Endgame?Who is the character that appears at the end of Endgame?What happens to Mjolnir (Thor's hammer) at the end of Endgame?The People's Ages in Avengers: EndgameWhat did Nebula do in Avengers: Endgame?Messing with time in the Avengers: Endgame climaxAvengers: Endgame timelineWhat are the time-travel rules in Avengers Endgame?Why use this song in Avengers: Endgame Opening Logo Sequence?Peggy's age in Avengers Endgame

            Are there legal definitions of ethnicities/races? The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Legal definitions in the United StatesAre there truly legal limits on US interest rates?Are gender identity and sexual orientation federally protected?Why is there an apparent legal bias against digital services?What limits are there to the powers of individual judges in the United States legal system?Are women only scholarships legal under Irish / EU law?Is the term “race” defined by Public Law enacted by Congress of the United StatesIs there a legal definition of race in the US?Neighbors are spying for landlord on Renters is it legal?Are Protected Classes Bi-directional?