HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ftp transferred file types
Operating System - HP-UX
1834432
Members
2455
Online
110067
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
06-30-2006 04:44 PM
06-30-2006 04:44 PM
Hi,
Some files has been transferred using ftp by someone. I need to verify whether files were transferred in binary or ascii mode.
Can anyone suggest how to verify ?
Thanks,
Shiv
Some files has been transferred using ftp by someone. I need to verify whether files were transferred in binary or ascii mode.
Can anyone suggest how to verify ?
Thanks,
Shiv
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2006 06:38 PM
06-30-2006 06:38 PM
Solution
It can sometimes be difficult to tell. The real difference is text files. On DOS/Windows boxes each line of text ends with a Carriage Return (CR - ASCII 0x0d), Linefeed (LF - ACSII 0x0a) pair whereas a UNIX text file ends with simply a LF.
Consider, transferring a Windows text file to UNIX in ASCII, in that case, each line of text is read and the CRLF pair is stripped off and replaced with a single LF.
(This is exactly what the dos2ux command does as well).
If the files are exactly the same size on both machines then almost certainly a binary transfer was done but, for example, if doing the above ASCII transfer of a text file from a Windows box to a UNIX but the Windows file simply had LF's on each line then an ASCII transfer would also be identical.
In short, without knowing the format of a given file before it was transferred; it is not possible to say WITH CERTAINTY how it was transferred. You can use od or xd to examine a file and display non-ASCII characters. Man od or xd for details.
By far, the wisest course, is to assert the actual transfer type using either the "ASCII" or "binary" ftp command before ever starting a file transfer. The default transfer mode is normally negotiated upon connecting the ftp client with the ftpd daemon.
Consider, transferring a Windows text file to UNIX in ASCII, in that case, each line of text is read and the CRLF pair is stripped off and replaced with a single LF.
(This is exactly what the dos2ux command does as well).
If the files are exactly the same size on both machines then almost certainly a binary transfer was done but, for example, if doing the above ASCII transfer of a text file from a Windows box to a UNIX but the Windows file simply had LF's on each line then an ASCII transfer would also be identical.
In short, without knowing the format of a given file before it was transferred; it is not possible to say WITH CERTAINTY how it was transferred. You can use od or xd to examine a file and display non-ASCII characters. Man od or xd for details.
By far, the wisest course, is to assert the actual transfer type using either the "ASCII" or "binary" ftp command before ever starting a file transfer. The default transfer mode is normally negotiated upon connecting the ftp client with the ftpd daemon.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2006 07:59 PM
06-30-2006 07:59 PM
Re: ftp transferred file types
hi shiv,
this may be possible only if your server has been configured to enable logging of FTP transactions.
the xferlog thereby generated will provide the required information. The format of the information logged is as follows:
(a single line with all fields being separated by spaces)
current-time
transfer-time
remote-host
file-size
filename
transfer-type
special-action-flag
direction
access-mode
username
service-name
authentication-method
authenticated-user-id
current-time-in-seconds
You will be interested in the following field:
transfer-type
A single character indicating the type of transfer which can be one of:
a for an ascii transfer
b for a binary transfer
hope this helps!
kind regards
yogeeraj
this may be possible only if your server has been configured to enable logging of FTP transactions.
the xferlog thereby generated will provide the required information. The format of the information logged is as follows:
(a single line with all fields being separated by spaces)
current-time
transfer-time
remote-host
file-size
filename
transfer-type
special-action-flag
direction
access-mode
username
service-name
authentication-method
authenticated-user-id
current-time-in-seconds
You will be interested in the following field:
transfer-type
A single character indicating the type of transfer which can be one of:
a for an ascii transfer
b for a binary transfer
hope this helps!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2006 12:22 AM
07-01-2006 12:22 AM
Re: ftp transferred file types
HI SHivkumar,
to enable FTP logging in widows,
http://www.windowsecurity.com/pages/article_p.asp?id=1251
To enable FTP lgging in HP-UX,
see the attachement "Installing and Administering Internet Services"
page number 51
and:
http://docs.hp.com/en/B2355-90778/ch02s01.html
more info:
man ftpaccess
man 1m ftpd
to enable FTP logging in widows,
http://www.windowsecurity.com/pages/article_p.asp?id=1251
To enable FTP lgging in HP-UX,
see the attachement "Installing and Administering Internet Services"
page number 51
and:
http://docs.hp.com/en/B2355-90778/ch02s01.html
more info:
man ftpaccess
man 1m ftpd
Be Tomorrow, Today.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP