Re: cp/scp

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

 



On 9/6/07, tony.chamberlain@xxxxxxxxx <tony.chamberlain@xxxxxxxxx> wrote:
>
> Hi
>
> Lets say I have two directories, /home/p1 and home/p2
>
> There is a file     /home/p1/file
> and then one     /home/p2/lnfile -> /home/p1/file
>
> (in other words   I did  ln -s /home/p1/file  /home/p2/lnfile)
>
> if I cd /home and do a
>
>    tar -zcvf tar.tz p1 p2
> or
>    scp -r p1 p2 10.0.0.20:
>
> then lnfile is no longer a symbolic link of file, but rather a duplicate.
> Is there anyway with tar and scp to preserver the link, symbolic or hard?
Not sure about tar but cpio should. Look at the -l --link option. This
is supposed to link files instead of copying them, when possible. I
have not tried it out. You will also have to look at all the options
tar uses to see if any would work. Maybe if you tar /home and exclude
all directories except p1 & p2, this might also work.

ne...
-- 
Registered Linux User # 125653 (http://counter.li.org)
Certified: 75% bastard, 42% of which is tard.
http://www.thespark.com/bastardtest
Now accepting personal mail for GMail invites.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux