Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Need to copy all content of a directory.

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 29-05-2009
Member
 
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.

Reply With Quote
  #2  
Old 29-05-2009
Member
 
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 ...
Reply With Quote
  #3  
Old 29-05-2009
Member
 
Join Date: May 2008
Posts: 2,381
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.
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
  #4  
Old 29-05-2009
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 08:15 PM.