- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- counting files with FTP
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
Discussions
Discussions
Forums
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
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
тАО01-12-2004 12:20 AM
тАО01-12-2004 12:20 AM
counting files with FTP
I have to get via FTP a number of files from a MPE system, but I do not know how many files are there. It is known that the file name is like BW*.
Using the connection established via FTP is it possible to check how many files are in the folder on the remote machine ?
Thanks
Angelo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2004 12:25 AM
тАО01-12-2004 12:25 AM
Re: counting files with FTP
Syntax would be something like this:
# ftp
>user
>prompt
>binary
>mget BW*
>by
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2004 12:37 AM
тАО01-12-2004 12:37 AM
Re: counting files with FTP
if you just want to count number of files via ftp next example will work:
Create an input file(name in.txt) like:
user 'username' password'
ls BW*
quit
then run next command:
ftp -n 'hostname'
This will result in the number of files on the remote host beginning with BW in the home directory of the user.
Regards,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2004 12:38 AM
тАО01-12-2004 12:38 AM
Re: counting files with FTP
Elmar is right.
his logout must be bye/close.. must be a typo.
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2004 06:57 PM
тАО01-12-2004 06:57 PM
Re: counting files with FTP
If tcp connection is broken it can build up again and continue from last byte.
So you should find preferred ftp client.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 11:35 AM
тАО01-13-2004 11:35 AM
Re: counting files with FTP
Just another twist -
ftp to the host, then:
lcd /tmp
ls remote_directory /tmp/remote_file_list
It will prompt you for the copy of the output of ls to be written to your local machine in /tmp/remote_file_list.
From there you can wc or whatever.
Best of luck.
Regards,
dl