- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: dos2ux || ux2dos
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
тАО11-13-2009 11:12 PM
тАО11-13-2009 11:12 PM
How do I find that the file which is transferred from windows machine to HP-UX in Binary mode or ASCII mode?
Assume I have set the file transfer mode as auto select in ftp and transferring the file.
Thanks,
V.P
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2009 11:20 PM
тАО11-13-2009 11:20 PM
Re: dos2ux || ux2dos
Or if you use dos2ux(1) on each file, nothing will change.
If you have binary files that have been transferred in ASCII, they will be corrupted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2009 11:27 PM
тАО11-13-2009 11:27 PM
Re: dos2ux || ux2dos
Thanks for the quick response.
Any command in HP-UX to find the transferred file is in ASCII mode or Binary mode?
I transferred one file from windows desktop to HP-UX box and using ├в vi├в editor, I was unable to find the ^M character. But when I executed the script, script terminated by giving the error ^M at the end of the command line.
Regards,
V.P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2009 11:58 PM
тАО11-13-2009 11:58 PM
Re: dos2ux || ux2dos
Once file has been transfered you can use
file command
file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2009 12:17 AM
тАО11-14-2009 12:17 AM
Re: dos2ux || ux2dos
Thanks for your response.
I have done the test file transfer (CMR3423.sh is in binary format & CMR.sh is in ASCII format). The output of file
Could you please check the same?
Steps:
Hostname /tmp >file CMR3423.sh
CMR3423.sh: English text
Hostname /tmp >dos2ux CMR3423.sh > CMR.sh
Hostname /tmp >file CMR.sh
CMR.sh: English text
Notepad enclosed for further understanding.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2009 03:09 AM
тАО11-14-2009 03:09 AM
Re: dos2ux || ux2dos
Not really. Nobody cares much about those CRs if there is lots of ASCII data.
>I was unable to find the ^M character.
Your attached file shows ^M.
>I have done the test file transfer (CMR3423.sh is in binary format & CMR.sh is in ASCII format).
Yes, the first has those CRs(^M) and the second is fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2009 08:01 AM
тАО11-14-2009 08:01 AM
SolutionAs you have seen, using the 'file' command will tell you that the file is "ascii text" regardless of whether or not its line terminators are simple newlines (\012) or carriage-return/newlines (\015\012) sequences.
To determine if you have carriage-return (CR)/newline(CRLF) sequences you can examine the file with 'cat', 'vis' or a commandline Perl script:
# cat -etv file
...will show ^M for a CR
# vis file
...will show \r lfor a CR
# perl -ne 'print if m{\r\n}' file
...will print _only_ lines with CRLF sequences, if any.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2009 09:04 AM
тАО11-16-2009 09:04 AM
Re: dos2ux || ux2dos
Regards,
V.P