Operating System - HP-UX
1833873 Members
4229 Online
110063 Solutions
New Discussion

Re: "Cutting" or Breaking-up a large file into several smaller files

 
SOLVED
Go to solution
Danny Fang
Frequent Advisor

"Cutting" or Breaking-up a large file into several smaller files

Hi,
I have a fairly large ASCII text file (50MB) generated as log file from a program, and I wish to "cut" or break-up the file into smaller chunks in equal sizes.

Could someone show me what is the UNIX utility to perform such a task, and also an example of its usage?

Thanks
Danny.
3 REPLIES 3
Muthukumar_5
Honored Contributor
Solution

Re: "Cutting" or Breaking-up a large file into several smaller files

You can use split utlity in hp-ux for this.

split -n

Check with split man page more options.

hth.
Easy to suggest when don't know about the problem!
renarios
Trusted Contributor

Re: "Cutting" or Breaking-up a large file into several smaller files

Hi Danny,

You can use the split command for it.
split -n

Check out the man page for more options (man split)

Cheerio,

Renarios
Nothing is more successfull as failure
Gopi Sekar
Honored Contributor

Re: "Cutting" or Breaking-up a large file into several smaller files


use the split command.

Never Never Never Giveup