Re: Flag to override 'cp' of symbolic links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2003-11-06 at 10:50, Paul Barclay wrote:
> What is the flag the makes cp copy the file and not the symbolic link?
> 
> I don't want a hard liked file I want to copy the symbolic link and have
> a distinct file after the operation.

Hi, 

try this:

my dir to copy from:

Thu Nov 06 11:07:39 kroll@bach:~> ls -l test
total 4
lrwxrwxrwx    1 kroll    kroll           3 Nov  6 11:06 B -> bla
-rw-rw-r--    1 kroll    kroll          41 Nov  6 11:07 bla

my dir to copy to:
Thu Nov 06 11:08:40 kroll@bach:~> ls -l test1/
total 0

now give the -L a try

Thu Nov 06 11:08:46 kroll@bach:~> cp -L test/* test1/

tada, and now:
Thu Nov 06 11:09:03 kroll@bach:~> ls -l test1/
total 8
-rw-rw-r--    1 kroll    kroll          41 Nov  6 11:09 B
-rw-rw-r--    1 kroll    kroll          41 Nov  6 11:09 bla

HTH
Volker


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux