- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- FTP files in all subdirectories
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2001 08:05 AM
05-01-2001 08:05 AM
Any help is greatly appreciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2001 08:29 AM
05-01-2001 08:29 AM
Re: FTP files in all subdirectories
You could do something like this:
#!/usr/bin/sh
for X in `find /tmp/dummydir -type f`
do
{ echo "open thehost
user uuu ppp
put $X $X.dup
close"
} | ftp -i -n -v
done
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2001 08:30 AM
05-01-2001 08:30 AM
Re: FTP files in all subdirectories
Far easier to download a different version of ftp from the HP-UX porting centre which will allow recursive ftp of files and subdirectories, eg;
http://hpux.connect.org.uk/hppd/hpux/Networking/FTP/ftpcopy-0.3.5/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2001 08:36 AM
05-01-2001 08:36 AM
Re: FTP files in all subdirectories
Ah...If by "get" you mean "pull" then I agree with Stefan. I read "get" as "process" and so provided a suggestion to "put" or "push" files!
Regards! :-))
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2001 12:45 PM
05-01-2001 12:45 PM
Re: FTP files in all subdirectories
If I read James' script correctly, it does not read the subdirectories recursively. (Excuse my limited knowledge on scripts.) I am trying to ftp one directory tree from Unix to NT, hopefully running from NT side. I am trying to automate this.
I guess there may not be an easy way to do it (as Stefan indicated).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2001 01:00 PM
05-01-2001 01:00 PM
Re: FTP files in all subdirectories
In case you haven't considered:
If your unix SA could install Samba on the unix server
(it's free!), you would be able to use the shared files/directories just like from another NT system.
Mladen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2001 02:25 PM
05-01-2001 02:25 PM
SolutionIt looks like James didn't quite test his script. I think after "do" line, you could insert something like:
XDIR=`dirname $X`
XFILE=`basename $X`
cd $XDIR
and then change the line:
put $X $X.dup
to
put $XFILE $XFILE.dup
This script will not duplicate the entire directory tree.
It will ftp all the files (including the files under subdirectories), but they will all end up in a single directory on your NT system.
If you'd like to duplicate the entire directory tree, you could create a tar archive, then ftp the archive to your NT system and then use Winzip on your NT system.
The unix part can be made automatic via a script
(schedule it as a cron job if you wish) - something like this:
cd
tar cvf /tmp/archive.tar
cd /tmp
{echo "open
user
put archive.tar
close"
} | ftp -i -n -v
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2001 04:46 AM
05-02-2001 04:46 AM
Re: FTP files in all subdirectories
A point of clarification (honor), please. The script I posted was quick and crude, but *was tested*. My intention was merely to show one way to recursively descend directories, and pick files to ftp.
No points, please, Wendy.
...JRF...