- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Text file to transfer to HPUX via Samba
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
тАО07-12-2006 03:20 PM
тАО07-12-2006 03:20 PM
Text file to transfer to HPUX via Samba
Samba in my HPUX is working fine. I am able to copy files between Windows and UNIX(via windows explorer). My problem is that when a text file from windows is saved into the home directory in unix, the text file has the "^M" at the end of each line. I know how to use FTP but my concern is for the common users. Another thing, some users are able to copy the text file to unix without the "^M" character in the unix file. While other users, when they save the text file into Samba, there is a "^M" at the end of each line.
Is there a setting that I'm missing here? Please help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2006 03:54 PM
тАО07-12-2006 03:54 PM
Re: Text file to transfer to HPUX via Samba
# dos2ux infile > outfile
- Tags:
- dos2ux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2006 09:21 PM
тАО07-12-2006 09:21 PM
Re: Text file to transfer to HPUX via Samba
If you are using Samba just to store files on the HP-UX server then there would be no need to convert the files as you would be using them on Windows. Can you give details of the way you are using the text files?
regards,
Darren.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2006 11:48 PM
тАО07-12-2006 11:48 PM
Re: Text file to transfer to HPUX via Samba
You're seeing '^M' at the end of each line because of the difference in DOS/Windows and *nix line termination characters. DOS/Windows represents the end of a line by a CR followed by a LF, while *nix OSes use just a LF character. So the DOS/Windows CR character shows up as '^M' under *nix.
If you do need to convert the textfiles (rather than just store them on your HP-UX box), I would suggest automating the conversion process. Create "drop folders" under HP-UX, and schedule conversion scripts via cron.
For example, say you had the following directory structure:
1. /text/dos2ux/in
2. /text/dos2ux/out
3. /text/ux2dos/in
4. /text/ux2dos/out
You could then create/schedule this script for (1) and (2):
#!/usr/bin/sh
for f in $(ls /text/dos2ux/in)
do
dos2ux ${f} &&\
mv ${f} /text/dos2ux/out ||\
mv ${f} /text/dos2ux/failed
done
exit 0
And this script for (3) and (4):
#!/usr/bin/sh
for f in $(ls /text/ux2dos/in)
do
ux2dos ${f} &&\
mv ${f} /text/ux2dos/out ||\
mv ${f} /text/ux2dos/failed
done
exit 0
Set up the appropriate samba shares, and instruct users on their use. Then schedule the scripts to run every minute or so.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2006 12:11 AM
тАО07-13-2006 12:11 AM
Re: Text file to transfer to HPUX via Samba
Now if there are binary data files and there are applications that run on both systems that can read these binary files, all is well. Otherwise, ftp is a better choice because it understands how to convert ASCII files between any computer (Macs, mainframes, PCs, etc).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2006 12:22 AM
тАО07-13-2006 12:22 AM
Re: Text file to transfer to HPUX via Samba
Newer versions of Samba have allowed me to correct this problem. When I upgraded to a CIFS/9000 version based on Samba 3, this specific issue stopped happening on my Samba servers.
The latest version of the server is available on http://software.hp.com
Search for CIFS/9000
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com