Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Linux

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 01-15-2007, 01:07 PM
davida@rapidpat.com
Newsgroup Contributor
 
Posts: n/a
cp command without symbolic links

What I want to do is copy files from one folder to another but not
create the destination files and folders without creating a symbolic
link to them.

The reason why is that we want to create a test site without going back
to the live links.

Any help would be appreciated.

I've tried cp --copy-contents but that still keeps the symbolic links
intact.

Thank you in advance.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 01-15-2007, 01:07 PM
  #2 (permalink)  
Old 01-15-2007, 01:07 PM
noi
Newsgroup Contributor
 
Posts: n/a
Re: cp command without symbolic links

On Fri, 12 Jan 2007 11:16:43 -0800, davida wrote this:

> What I want to do is copy files from one folder to another but not create
> the destination files and folders without creating a symbolic link to
> them.
>
> The reason why is that we want to create a test site without going back to
> the live links.
>
> Any help would be appreciated.
>
> I've tried cp --copy-contents but that still keeps the symbolic links
> intact.
>
> Thank you in advance.


Wouldn't that be

$ cp -d /folder /foldercopy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 01-15-2007, 01:07 PM
davida@rapidpat.com
Newsgroup Contributor
 
Posts: n/a
Re: cp command without symbolic links


When I try that I get:

cp: omitting directory `/www/docs/www.XXX.com/sports/c-bowl/'

noi wrote:
> On Fri, 12 Jan 2007 11:16:43 -0800, davida wrote this:
>
> > What I want to do is copy files from one folder to another but not create
> > the destination files and folders without creating a symbolic link to
> > them.
> >
> > The reason why is that we want to create a test site without going back to
> > the live links.
> >
> > Any help would be appreciated.
> >
> > I've tried cp --copy-contents but that still keeps the symbolic links
> > intact.
> >
> > Thank you in advance.

>
> Wouldn't that be
>
> $ cp -d /folder /foldercopy


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 01-15-2007, 01:07 PM
Robert Hull
Newsgroup Contributor
 
Posts: n/a
Re: cp command without symbolic links

On Friday 12 Jan 2007 19:40, noi <noi@siam.com> wrote in alt.os.linux:

> On Fri, 12 Jan 2007 11:16:43 -0800, davida wrote this:
>
>> What I want to do is copy files from one folder to another but not
>> create the destination files and folders without creating a symbolic
>> link to them.
>>
>> The reason why is that we want to create a test site without going
>> back to the live links.
>>
>> Any help would be appreciated.
>>
>> I've tried cp --copy-contents but that still keeps the symbolic links
>> intact.
>>
>> Thank you in advance.

>
> Wouldn't that be
>
> $ cp -d /folder /foldercopy


That would be the opposite of what the OP appears to want to do.

IIUC the OP wants all symlinks to be created as real files so (s)he
*does* want to dereference the links. The command would be either

cp -L /source /destination

or

cp --dereference /source /destination

depending on how much you want to type.
--
Robert HULL

Archival or publication of this article on any part of thisishull.net
is without consent and is in direct breach of the Data Protection Act
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 01-15-2007, 01:07 PM
J.O. Aho
Newsgroup Contributor
 
Posts: n/a
Re: cp command without symbolic links

davida@rapidpat.com wrote:
> noi wrote:


Please don't top-post.
>>> I've tried cp --copy-contents but that still keeps the symbolic links
>>> intact.
>>>

>> Wouldn't that be
>> $ cp -d /folder /foldercopy
>>


Add the -r option and you should get subdirectories too.

--

//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #6 (permalink)  
Old 01-15-2007, 01:07 PM
J.O. Aho
Newsgroup Contributor
 
Posts: n/a
Re: cp command without symbolic links

Robert Hull wrote:
> On Friday 12 Jan 2007 19:40, noi <noi@siam.com> wrote in alt.os.linux:
>
>> On Fri, 12 Jan 2007 11:16:43 -0800, davida wrote this:
>>
>>> What I want to do is copy files from one folder to another but not
>>> create the destination files and folders without creating a symbolic
>>> link to them.
>>>
>>> The reason why is that we want to create a test site without going
>>> back to the live links.
>>>
>>> Any help would be appreciated.
>>>
>>> I've tried cp --copy-contents but that still keeps the symbolic links
>>> intact.
>>>
>>> Thank you in advance.

>> Wouldn't that be
>>
>> $ cp -d /folder /foldercopy

>
> That would be the opposite of what the OP appears to want to do.
>
> IIUC the OP wants all symlinks to be created as real files so (s)he
> *does* want to dereference the links. The command would be either
>
> cp -L /source /destination
>
> or
>
> cp --dereference /source /destination
>
> depending on how much you want to type.


As he has subdirectories, he would want to add -r option

cp -Lr /source /destination


--

//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #7 (permalink)  
Old 01-15-2007, 01:07 PM
davida@rapidpat.com
Newsgroup Contributor
 
Posts: n/a
Re: cp command without symbolic links


Thanks! That worked. Appreciate the help!


J.O. Aho wrote:
> Robert Hull wrote:
> > On Friday 12 Jan 2007 19:40, noi <noi@siam.com> wrote in alt.os.linux:
> >
> >> On Fri, 12 Jan 2007 11:16:43 -0800, davida wrote this:
> >>
> >>> What I want to do is copy files from one folder to another but not
> >>> create the destination files and folders without creating a symbolic
> >>> link to them.
> >>>
> >>> The reason why is that we want to create a test site without going
> >>> back to the live links.
> >>>
> >>> Any help would be appreciated.
> >>>
> >>> I've tried cp --copy-contents but that still keeps the symbolic links
> >>> intact.
> >>>
> >>> Thank you in advance.
> >> Wouldn't that be
> >>
> >> $ cp -d /folder /foldercopy

> >
> > That would be the opposite of what the OP appears to want to do.
> >
> > IIUC the OP wants all symlinks to be created as real files so (s)he
> > *does* want to dereference the links. The command would be either
> >
> > cp -L /source /destination
> >
> > or
> >
> > cp --dereference /source /destination
> >
> > depending on how much you want to type.

>
> As he has subdirectories, he would want to add -r option
>
> cp -Lr /source /destination
>
>
> --
>
> //Aho


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding "Create symbolic link here"? RealCat Windows Vista 3 06-30-2008 11:50 AM
Can not create symbolic link to a file - symlink to directory is O Spooky Windows Vista 0 12-11-2007 05:23 PM
junction points/ symbolic links possible on network drives? markm75c@gmail.com Windows XP 0 11-14-2007 08:00 AM
Junction points and symbolic links Dave Windows Vista 0 11-03-2007 03:50 AM
Symbolic links can only be create in the console? Cat Windows Vista 4 02-12-2007 11:46 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 12:21 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0