1

I have a directory say ~/MyWorks which contains the following files in it: a.c, b.c and c.c

I want to copy the MyWorks directory to ~/MyAssignments such that only the directory MyWorks is copied and not the files in it. How should I best go about this?

3
  • What do you want to happen with the files that currently exist in MyWorks?
    – SiegeX
    Commented Dec 2, 2010 at 4:23
  • 1
    BTW, you can use backticks `like this` to put bits of code inline in your post, like this, so that you don't have line breaks all over the place.
    – Karl Knechtel
    Commented Dec 2, 2010 at 4:24
  • @SiegeX. First i want to create MyWorks directory and after that only i need to copy the files in it Commented Dec 2, 2010 at 5:10

1 Answer 1

10
mkdir ~/MyAssignments/MyWorks
2
  • 2
    A++++++++ Would Read Again
    – erjiang
    Commented Dec 2, 2010 at 4:22
  • 3
    To clarify: you're not really "copying" the directory; you just want to end up with a directory with the same name. Since you're going to have to type the name of the directory anyway, just use the "make a directory with this name" command, which is spelled mkdir.
    – Karl Knechtel
    Commented Dec 2, 2010 at 4:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .