unix question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zester
    Confirmed User
    • Jul 2003
    • 5344

    #1

    unix question

    lets say I have a folder by the name of "myfolder"
    which subfolders: "folder1" "folder2" and "folder3"

    how do use the "cp" command to copy everything in folder "myfolder" including subfolders excluding "folder2"?
    * Mainstream ? $65 per sale
    * new male contraception
  • fireorange
    Confirmed User
    • Jan 2005
    • 1648

    #2
    Geeks where are you?

    Comment

    • fireorange
      Confirmed User
      • Jan 2005
      • 1648

      #3
      http://www.us-webmasters.com/FreeBSD...-unix-FreeBSD/

      I think you need to add -r for recursive.

      Hope that helps.

      Comment

      • fireorange
        Confirmed User
        • Jan 2005
        • 1648

        #4
        Originally posted by Zester
        how do use the "cp" command to copy everything in folder "myfolder" including subfolders excluding "folder2"?
        Oh wait I don't think you can exclude just one sub-dir,

        Anyway here's another bump for you

        Comment

        • etech
          Confirmed User
          • Feb 2004
          • 1148

          #5
          I dont think you can exclude a sub folder either.
          cp -rf folder
          would force to copy the folder recursive

          Comment

          • beta-tester
            Rock 'n Roll Baby!
            • Sep 2004
            • 22562

            #6
            for example:

            ln -s myfolder/* .

            Sig for sale. Affordable prices. Contact me and get a great deal ;)

            My contact:
            ICQ: 944-320-46
            e-mail: manca {AT} HotFreeSex4All.com

            Comment

            • psili
              Confirmed User
              • Apr 2003
              • 5526

              #7
              I know you can tar the directories and by use of a text file with the folders you don't want listed in there, the tar will exclude anything you don't want. Then just move the tarball to where you want and untar.

              I don't remember how exactly to do it, but I've used it on copying huge photoset directories with tons of folders and files I didn't want and tons that I did.
              Your post count means nothing.

              Comment

              • blazin
                Confirmed User
                • Aug 2002
                • 2781

                #8
                cp -rp

                - the p will preserve the file attributes
                I don't endorse a god damn thing......

                Comment

                Working...