From: Janis Papanagnou on
Ben Bacarisse schrieb:
> Loki Harfagr <l0k1(a)thedarkdesign.free.fr.INVALID> writes:
>
>> Mon, 26 Jul 2010 00:19:40 -0700, laxman did cat :
>>> Please send me a script for the below purpose " moving files from
>>> current location to ftp" and need to generate a mail or log if files are
>>> not moving.
>>>
>>> Please send me as soon as possible it is very urgent for me.
> <snip>
>> though this question should have been posted in Spetember, not in July
>> heres's your script as you mentioned it was urgent, be sure it'll be
>> treated a real emergency then on.
>> -----
>> #!/bin/sh
>> cd
>> find . -type f -print0|xargs -t -0 -I wot mv wot ftp 2>/tmp/errlog
>> -----
>
> Is this reply justified? I'm not sure. To the OP: don't run this
> unless you want to learn, the hard way, not to run scripts you don't
> understand.

Especially if those guys run every homework task as root, and then
maybe even on an old system where root's home directory is /, which
would be even more fatal than running it on a (hopefully backed-up)
simple user's home directory where only small deltas get lost.

Janis
From: Loki Harfagr on
Mon, 26 Jul 2010 16:26:21 +0200, Janis Papanagnou did cat :

> Ben Bacarisse schrieb:
>> Loki Harfagr <l0k1(a)thedarkdesign.free.fr.INVALID> writes:
>>
>>> Mon, 26 Jul 2010 00:19:40 -0700, laxman did cat :
>>>> Please send me a script for the below purpose " moving files from
>>>> current location to ftp" and need to generate a mail or log if files
>>>> are not moving.
>>>>
>>>> Please send me as soon as possible it is very urgent for me.
>> <snip>
>>> though this question should have been posted in Spetember, not in July
>>> heres's your script as you mentioned it was urgent, be sure it'll be
>>> treated a real emergency then on.
>>> -----
>>> #!/bin/sh
>>> cd
>>> find . -type f -print0|xargs -t -0 -I wot mv wot ftp 2>/tmp/errlog
>>> -----
>>
>> Is this reply justified? I'm not sure.

Well, you may be awfully right and I may have reacted a bit too much too soon
and when a while after I posted I read the second post of laxman I felt sorry
I had as I now figured he was more sincere than what I thought at first post.

Now, on another side you may reckon that my posted solution was an almost exact
answer to his request as posted. I admit I introduced a twist in adding the 'cd '
but the rest exactly "moved files from current location to ftp" *and* "generate(d) a log"
OK, this was slightly evil but I imagined the poster had the abilities to
immediatly see that a 'mv * ftp' was maybe a bit over the top.

>> To the OP: don't run this
>> unless you want to learn, the hard way, not to run scripts you don't
>> understand.

that was part of the idea while posting it, other part was "try and describe
with correct precision what you really want to do" (as I'm still slightly
puzzled about what exact needs he has), I used to play this with some
trainees but I confess that doing it on blindfolded and multi-proxemic
groups may look (and end-up) nasty.

> Especially if those guys run every homework task as root, and then maybe
> even on an old system where root's home directory is /, which would be
> even more fatal than running it on a (hopefully backed-up) simple user's
> home directory where only small deltas get lost.
>
> Janis

that's right, it then would have a third added hidden value in the hard played game ,->

Laxman, sorry, really. For what I understand you want to do I'd recommend
you to use extended FTP clients like ncftp[batch] or lftp, that is if you're
only interested in the 'urgent' side of your requirements and that it is not a
part of a homework you *must* achieve with determined tools. (in which case you'd
get more appropriate answers by posting the exact text of the homework, as
you posted a PoC some may feel like trying and help a poor soul when worded
with a trembling chin and a readable Q&A ;-)
First  |  Prev  | 
Pages: 1 2
Prev: ulimit question
Next: log generation