Find the answer to your Linux question:
Results 1 to 3 of 3
Hey all, I recently installed openSUSE 10.3 with KDE and have been pretty happy with it so far as a Windows alternative. I've been forcing myself to use the console ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Location
    Orlando, FL
    Posts
    6

    Copying a folder's contents without copying the folder


    Hey all,

    I recently installed openSUSE 10.3 with KDE and have been pretty happy with it so far as a Windows alternative. I've been forcing myself to use the console for menial things in order to better acquaint myself with Linux. This is my problem:

    I'd like to copy a folder's contents, let's say /media/pictures/ for a folder with pictures on a CD. I want just the contents of /media/pictures/ without another pictures folder being created. For example, I've tried
    Code:
    cp -r /media/pictures/ /home/littlebear/pics/
    This creates a pictures folder within the folder pics along with the other contents of /media/pictures. I want just the folders and files that exist within pictures, not a new directory that would be /home/littlebear/pics/pictures.

    I'm sorry if that is a bit convoluted. Let me know if you know what I'm talking about or need me to clarify. Thanks for the help.

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,756
    Code:
    cp -r /media/pictures/* /home/littlebear/pics/
    That should do it...

  3. #3
    Just Joined!
    Join Date
    Jan 2008
    Location
    Orlando, FL
    Posts
    6
    Great! Thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •