Results 1 to 4 of 4

Thread: Need to copy all content of a directory.

  1. #1
    Join Date
    May 2008
    Posts
    120

    Need to copy all content of a directory.

    HI,

    I am new to Linux.

    I can use cp for copying the files 7 directories but I don't know the exact way & what are the things that i must take care while copying files in bulk from 1 place to other.

    Please guide me.

  2. #2
    Join Date
    Feb 2009
    Posts
    133

    Re: Need to copy all content of a directory.

    hi,

    IF you are new to Linux then I must say please go through this topic.
    Basic Linux Commands 2
    It consist of all the required basic linux command you need & are useful.
    I hope this helps.
    IF YOU CAN'T Convince THEM ...

    CONFUSE THEM ...

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: Need to copy all content of a directory.

    cp

    Code:
    cp [options] file1 file2 cp [options] files directory
    Copy file1 to file2, or copy one or more files to the same names under directory. If the destination is an existing file, the file is overwritten; if the destination is an existing directory, the file is copied into the directory (the directory is not overwritten).

    Options

    -a, --archive
    Preserve attributes of original files where possible. The same as -dpr.

    -b, --backup
    Back up files that would otherwise be overwritten.

    -r, -R, --recursive
    Copy directories recursively.

    -s, --symbolic-link
    Make symbolic links instead of copying. Source filenames must be absolute.

  4. #4
    Join Date
    Apr 2008
    Posts
    586

    Re: Need to copy all content of a directory.

    cp command to copy all files and folder.

    Code:
    [root@fedora test]# cd ..
    [root@fedora ~]# cp -pr /home/fedoracore5/ test/fedoracore5
    [root@fedora ~]# ls test/fedoracore5/
    Desktop
    [root@fedora ~]# ls /home/fedoracore5/
    Desktop
    [root@fedora ~]# ls -al /home/fedoracore5/
    Cp command with option 'p' is to preserve the mode, ownership and timestamps of the file an the option 'r' is use to copy directory recursively.

Similar Threads

  1. How to copy paste content in Merge Cells
    By HangOver in forum MS Office Support
    Replies: 2
    Last Post: 27-01-2012, 04:13 PM
  2. X- Copy directory wildcard use
    By Beryl in forum Operating Systems
    Replies: 4
    Last Post: 27-03-2010, 07:57 PM
  3. How to copy a directory or folder
    By Francesca in forum Tips & Tweaks
    Replies: 4
    Last Post: 27-03-2010, 06:36 PM
  4. Can't copy content of some sites
    By screwball in forum Technology & Internet
    Replies: 4
    Last Post: 31-01-2010, 04:29 AM
  5. How to copy content from web page without formatting?
    By bharti_rajpal in forum Technology & Internet
    Replies: 5
    Last Post: 13-01-2010, 05:01 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,869,794.56047 seconds with 17 queries