[ale] Rsync and renaming files

Jeff Lightner jlightner at water.com
Wed Aug 5 07:21:10 EDT 2009


There is a command called "script" that will record everything you do
(including output).  You could run that then extract the relevant
commands to make your shell script.

Also there the "expect" package includes a thing called "autoexpect"
that tries to generate an expect script from what you do.   You could do
that and try cleaning it up to be a simple shell script.

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
Richard Bronosky
Sent: Tuesday, August 04, 2009 9:42 PM
To: Atlanta Linux Enthusiasts - Yes! We run Linux!
Subject: Re: [ale] Rsync and renaming files

Make sure bash is keeping a .bash_history. That file updates after you
exit bash cleanly, so make sure you exit with 'exit' or ctrl-D and not
by closing your terminal. After you do all of you mv commands, exit,
then open the .bash_history in a text editor, clean it up, save it
with the .sh extension, email it. Done.

On 8/4/09, Andrew Grieser <agrieser at gmail.com> wrote:
> Hey all,
>
> I have a rather large project that is being kept in sync on two
different
> servers via rsync. I would like to rename several files and
directories,
> however I think rsync will simply delete the re-named files on the
remote
> server and copy them over again. The filesizes are large enough (or
rather
> the bandwidth low enough) that I really don't want this to happen.
>
> So I have two questions:
>
> 1) Is there a way for rsync to handle re-named files and directories
in a
> smart way? ie without removing them?
>
> 2) Is there a way I can automatically turn an interactive bash session
into
> a script, or provide some way to play it back (and execute it while
playing
> back)? For example, I open a terminal, and 'mv' a bunch of files, grab
the
> script that results, and send it to the remote server so that it can
also be
> run on there?
>
> I don't have ssh access to the remote server, as it's actually
rsync-ing
> from me. So I need to be able to send a script to the admin on the
remote
> server.
>
> Ideas?
>
> Andrew
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
>

-- 
Sent from my mobile device

.!# RichardBronosky #!.
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
 
Please consider our environment before printing this e-mail or attachments.
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------



More information about the Ale mailing list