70 likes | 285 Views
Split - grab. Instructions for file transfer – KCL Micromet 25/10/2011 Simone Kotthaus. Split. Grab: transfer data to one central location. All happening on data02 Script path: /home/ micromet / Roofprograms /grab Main script, scheduled as cronjob grab_V1.sh
E N D
Split - grab Instructions for file transfer – KCL Micromet 25/10/2011 Simone Kotthaus
Grab: transfer data to one central location • All happening on data02 • Script path: /home/micromet/Roofprograms/grab • Main script, scheduled as cronjobgrab_V1.sh • To list cronjobs, type crontab –l • Run shell script with one of the following control options • 1to grab hourly files • 2to grab daily files • 3 to grab hourly files of whole last day – ‘grab missing’ • 4 to grab missing files from yesterday
Grab: transfer data to one central location • Script takes ‘from’ and ‘to’ information from text file ‘/home/micromet/Roofprograms/grab/FileLocations’ • This is text file with 4 columns, separated by space • Type • 0 = do not grab • 1 = hourly file • 2 = daily file • Source: complete file name incl. path • Destination folder • Destination file name
Grab: transfer data to one central location • In order to rerun the grabbing, logon to data02 and type the following commands • cd /home/micromet/Roofprograms/grab • ls –l to list all files in this folder, always use latest version of grab script • ./grab_V1.sh 3 to grab missing hourly data from yesterday • ./grab_V1.sh 4 to grab missing daily data from yesterday • exit to leave data02