avatar
Help! shell programming# Unix - 噫吁兮,危乎高哉
c*e
1
My boss asked me to write a shell program to do the following things:
1. find the changed files during a day. I guess it could be accomplished
by 'find ' utility.
2. copy those changed files to another machine across a network. Is 'ftp'
usable? If so, how to use ftp? How to disable the prompting and provide
it with userID and password?
Or there is some other way to do it instead of 'ftp'?
3. the script has to run every night automatically. I heard 'cron' can do
that, but I have ne
avatar
j*g
2
man cron
man crontab
search google for cron
....

【在 c********e 的大作中提到】
: My boss asked me to write a shell program to do the following things:
: 1. find the changed files during a day. I guess it could be accomplished
: by 'find ' utility.
: 2. copy those changed files to another machine across a network. Is 'ftp'
: usable? If so, how to use ftp? How to disable the prompting and provide
: it with userID and password?
: Or there is some other way to do it instead of 'ftp'?
: 3. the script has to run every night automatically. I heard 'cron' can do
: that, but I have ne

avatar
c*e
3
OK, then. I figured out how to use cron. But I still have no idea how
to transfer a file to another machine in shell script.
Anyone knows? Thanks!

【在 j*****g 的大作中提到】
: man cron
: man crontab
: search google for cron
: ....

avatar
c*t
4

You've already known these stuff. Read man pages instead of
asking help.

【在 c********e 的大作中提到】
: My boss asked me to write a shell program to do the following things:
: 1. find the changed files during a day. I guess it could be accomplished
: by 'find ' utility.
: 2. copy those changed files to another machine across a network. Is 'ftp'
: usable? If so, how to use ftp? How to disable the prompting and provide
: it with userID and password?
: Or there is some other way to do it instead of 'ftp'?
: 3. the script has to run every night automatically. I heard 'cron' can do
: that, but I have ne

avatar
c*t
5
1. like others have suggested, read man pages of them first.
the commands you discribed can do the job. Just a note
that you can use shell script to generate a ftp script
in .netrc (which you may have to create a special account for it)..
Or you can use expect script. Or you can tar the files
first if they are not too big.
2. you may also want to try out uucp, which I have no idea
of using.
3. You can do NFS mount and.

【在 c********e 的大作中提到】
: My boss asked me to write a shell program to do the following things:
: 1. find the changed files during a day. I guess it could be accomplished
: by 'find ' utility.
: 2. copy those changed files to another machine across a network. Is 'ftp'
: usable? If so, how to use ftp? How to disable the prompting and provide
: it with userID and password?
: Or there is some other way to do it instead of 'ftp'?
: 3. the script has to run every night automatically. I heard 'cron' can do
: that, but I have ne

avatar
j*g
6
man ncftpput
man ncftpget

【在 c********e 的大作中提到】
: OK, then. I figured out how to use cron. But I still have no idea how
: to transfer a file to another machine in shell script.
: Anyone knows? Thanks!

avatar
T*r
7
$ man rcp
it's simple.

【在 c*****t 的大作中提到】
: 1. like others have suggested, read man pages of them first.
: the commands you discribed can do the job. Just a note
: that you can use shell script to generate a ftp script
: in .netrc (which you may have to create a special account for it)..
: Or you can use expect script. Or you can tar the files
: first if they are not too big.
: 2. you may also want to try out uucp, which I have no idea
: of using.
: 3. You can do NFS mount and.

avatar
s*t
8
or scp. it's secure.

【在 T********r 的大作中提到】
: $ man rcp
: it's simple.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。