FUNCTION tarblocks,date ;+ ; NAME: ; TARBLOCKS ; PURPOSE: ; Calculate the number of blocks saved in a 'tar' archive of ; .ray files, or other files. ; CATEGORY: ; ; CALLING SEQUENCE: ; b = TARBLOCKS( YYMMDD ) ; INPUTS: ; YYMMDD: The date of the data stored in the .ray or other files. ; KEYWORD PARAMETERS: ; None. ; OUTPUTS: ; The number of blocks in the save set. ; COMMON BLOCKS: ; None. ; SIDE EFFECTS: ; None. ; RESTRICTIONS: ; None. ; PROCEDURE: ; A 'ls -l' command is SPAWNed to get the number of bytes in ; each file, and the number of blocks is calculated from the ; byte counts. ; MODIFICATION HISTORY: ; Written 94/03 by D P Steele. ; Documented 94/06 by D P Steele. ;- ds=STRTRIM(date,2) SPAWN,'ls -l ~cnsr3/save/'+ds+'??.*',ls nf=N_ELEMENTS(ls) bb=LONARR(nf) FOR i=0,nf-1 DO bb(i)=LONG(getwrd(ls(i),3)) bl=CEIL(bb/512.) RETURN,TOTAL(bl) END