Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Excluding a directory with ncftpput



Dave M G wrote:
TLUG,

I'm using the following command to upload all the files within a directory called "web", within a shell script:

ncftpput -R -u"username" -p"password" ftp.server.net / web

[...]
However, I can't find any option with ncftpput to exclude a directory, which is bad. I have one directory in the whole tree that I need to exclude.
[..]

Is there a way to do that?

Without having used ncftp much:

for i in `ls PATH_TO_WEB/web|grep -v exclude-dir`; do
echo "-- Putting $i --"
ncftpput -R -u"username" -p"password" ftp.server.net / PATH_TO_WEB/web/$i
done


should do the trick, but it's untested:-)

kind regards,
-sig

--
Sigurd Urdahl
Linux, goofing, cooking, making fire, computer security, having a
beer. Give me good music.



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links