[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Question about scripts
- Subject: [ale] Question about scripts
- From: james.sumners at gmail.com (James Sumners)
- Date: Fri, 17 Jul 2009 18:31:16 -0400
- In-reply-to: <[email protected]>
- References: <[email protected]>
#!/bin/bash
dircopy="/vhosts/pictures/vikram"
dirremote="/media1"
cp -Rv ${dircopy}/* ${dirremote} >> /var/log/copyfiles.log
On Fri, Jul 17, 2009 at 3:31 PM, Chuck Payne <terrorpup at gmail.com> wrote:
>
> Guys,
>
> I need to copy a dir with a lot of files, and I want to make sure I
> get them all, but I can't get my script to write to my log, any clues
> how I can get to work? Also how I can get to dump to one line per
> file?
>
> #!/bin/sh
> touch /var/log/copyfiles.log
>
> dircopy="/vhosts/pictures/vikram"
> dirremote="/media1"
>
> while true ; do
> echo "`cp -R $dircopy/* ?$dirremote `" >> /var/log/copyfiles.log
> done
>
> Thanks
>
> --
> ----------------------------------------
> Old utilities do not die they just slowly fade away!
> -----------------------------------------
> OpenSUSE -- http://en.opensuse.org/User:Terrorpup
> OpenSuSE Ambassador
> OpenSuSE Member
> Skype -- terrorpup
> twitter -- terrorpup
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
--
James Sumners
http://james.roomfullofmirrors.com/
"All governments suffer a recurring problem: Power attracts
pathological personalities. It is not that power corrupts but that it
is magnetic to the corruptible. Such people have a tendency to become
drunk on violence, a condition to which they are quickly addicted."
Missionaria Protectiva, Text QIV (decto)
CH:D 59