[K12OSN] script....or cat help Samba/LDAP

Les Mikesell les at futuresource.com
Tue Jul 13 02:53:26 UTC 2004


On Mon, 2004-07-12 at 21:30, David Trask wrote:
> What I'd like to be
> able to do is something like ...take whatever text is in file "A" and copy
> it over to file "B" and in the process overwrite anything that is
> currently in file "B".

cat A >B
will put the contents of A into B, keeping B's ownership and
permissions if it already exists.

>   This way I could possibly "batch" or "shell
> script" a whole bunch of files to go where they need to with all the
> changes made ahead of time.  Can this be done?  If so....how?

If you want to copy a bunch of files at once, keeping ownership
etc., you can make a tar or cpio archive from the source
and restore it at the destination.

---
  Les Mikesell
   les at futuresource.com






More information about the K12OSN mailing list