Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Big Files 1

Status
Not open for further replies.

midge25

Programmer
Jul 19, 2002
9
Hi,

I am trying to run the following on a set of files which are really large:

cat ./working_dir/CP900*.new | sort -k 1.1,1.43 -o ./merged_dir/CP900.merged

When I do this, it blows the space in tmp and I get the following error:

/usr: write failed, file system is full
sort: A write error occurred while sorting.

Is there an alternative command that I can use for the above that will not blow file space ??

 
Do a
Code:
 man sort
and take a look at the -T and -y options. Furthermore you don't have to cat the files to the sort command:
Code:
sort -k 1.1,1.43 -o merged_dir/CP900.merged working_dir/CP900*.new


Hope This Help
PH.
 
Try using -T for naming a directory to hold the sort
(and you don't need cat )
sort -T /a_large_dir -o /merged_dir/CP900.merged
working_dir/CP900*.new

HTH

Dickie Bird (:)-)))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top