How do unix file lenghts work?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How do unix file lenghts work?
# 1  
Old 08-30-2012
How do unix file lenghts work?

Hello,

Can someone tell me how unix works out file lenghts please? If I'm ftp'ing a file from a mvs mainframe to a unix box will the file be replicated line by line? I'm looking at the file on the unix box and it's telling me the recl is almost 4000 but it's not that on the mvs side. Should a txt file on unix be a fixed length?

Any help appreciated as usual

Thanks

G
# 2  
Old 08-30-2012
On a UNIX system, the size of a file is the offset in the file of the last byte in the file. Text files on UNIX Systems can be any size from 0 bytes to several terabytes depending on available disk space, file system limitations, and system administrator imposed file size limits for each user on the system.

Note that if you're copying a file from an MVS system (with an EBCDIC code set) to a UNIX system with an ISO 8859-*, ASCII, or UTF-8 codeset, you may need to use:
Code:
dd if=mvs_filename of=unix_filename conv=ascii

after getting the MVS file moved onto your UNIX System.
This User Gave Thanks to Don Cragun For This Post:
# 3  
Old 08-30-2012
It's best to think about UNIX files as not blocked, think more like a single data stream for the entire file content. File size on UNIX is a total byte count, so if you have 50 lines of block size 80 that will come out to about 4000 bytes. Like Don says above, make sure you convert to ascii format using the appropriate ftp commands.
# 4  
Old 08-30-2012
Assuming that recl means Record Length, this suggests that the entire file has been moved as one 4000-byte record, or that the block size was 4000.

No sizing was posted for the IBM file.
No detailed sizing was posted for the unix/Linux? file.

What ftp mode did you use? ASCII or BINARY or something else which was IBM-specific?

It always helps if you post what Operating System and version you have and what Shell you are using.
In this post it would help if we saw the ftp commands and it was made 100% clear which computer processed the commands.

Footnote: When IBM is involved, it can be easier to issue the ftp commands from the IBM computer.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

UNIX script home work

plz can any one help to write the script of the output provided in the pdf. There are 2 tasks A and B. (5 Replies)
Discussion started by: mohdsadik90
5 Replies

2. Shell Programming and Scripting

UNIX Shell script to work with .xml file

Hi Team, Could you please help me on below query: I want to retrieve XML elements from one .xml file. This .xml file has commented tags as well. so i am planning to write Unix command/script which 1.will chekc for this .xml file 2. it will ignore the commented XML lines. i.e. XML tags between... (3 Replies)
Discussion started by: waiting4u
3 Replies

3. Programming

Ensure C++ will work on a Unix system

For my one college course, my professor said that we have to ensure that the C++ code we send him will work on a Unix system. I in turn installed Cygwin on my Windows 7 machine, and have been using that to compile and check my code, but it sounds like Cygwin is still compiling the code for my... (2 Replies)
Discussion started by: davidp007
2 Replies

4. UNIX for Dummies Questions & Answers

Emergency work question for a Unix dummy

Im trying to awk two values from each a line (about 40000 lines in the file): e.g. gi|10580442|gb|AAG19320.1| inosine-5'-monophosphate dehydrogenase-like I want to get the value between the first set of pipes and then the value between square brackets separated by a tab, i.e. 10580442... (6 Replies)
Discussion started by: gorkin
6 Replies

5. UNIX for Dummies Questions & Answers

Any Linux/Unix work with SATA yet?

i got my computer in 2k, built it myself. top of the line then and better than most still now. one problem however is i was never able to install unix because the old kernels were not compatible with SATA hard drives i dont have any IDE drives nor do i want any I want mine on SATA, but every... (5 Replies)
Discussion started by: GXDeMoNN
5 Replies

6. Shell Programming and Scripting

startup scripts, how do they work in UNIX?

I need to make a script to start the postfix service on a server when the machine starts up. I have a script written below, which I think will work, but I am confused on how the rc2.d & rc3.d etc directories actually work. If I enter the script below, and stick it in the rc3.d directory,... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

7. Shell Programming and Scripting

Multiple excel work sheets through UNIX

Hi, There is this requirement to create multiple work sheets in an MS Excel file through UNIX. We normally can create one work sheet in unix by either tab or comma delimiting and appending .xls or .csv to the file name, but can we create multiple work sheets. Regards, Puspendu (1 Reply)
Discussion started by: puspendu
1 Replies

8. Post Here to Contact Site Administrators and Moderators

no-reply@unix.com does not work

Hello I just want to say that the "no-reply@unix.com " does not work. emails never get threw. I have been trying to get a my password for the last two weeks. :( After trying for awhile i got. Thanks peterh (1 Reply)
Discussion started by: Peterh
1 Replies

9. UNIX for Dummies Questions & Answers

old unix machine at work model # wy-50

I was a tec at AT&T for 36 years and now work at a Doctor's office. We have the old unix unit in our office and it seems my keeps going out. Since, this was my line of work I want to repair this unit so I will not have to walk to the other office. Here is all the info off the unit which is just... (1 Reply)
Discussion started by: marycarroll
1 Replies

10. UNIX for Dummies Questions & Answers

Reboot the Unix work station

Hi I'd like to know if to reboot a work station I need the root permission. If not what is the procedure ( commands or steps ) to reboot a work station. Cheers Mohsen (5 Replies)
Discussion started by: mohsen
5 Replies
Login or Register to Ask a Question