Hello, I have a MASSIVE backup script and the following lines are giving me fits... I am wanting to run 'df -hT' on the server, 'ls -lt' to list the timestamps of the directories present, and write this info to a logfile ON THE SERVER. Check this:

Keep in Mind: LOGLOCATION4=~/, BUSUBDIR=a form of today's date (I forget what I actually used here)

#Track used disk space
ssh backups df -hT | grep /backups >> $LOGLOCATION4$BUSUBDIR.txt
ssh backups echo ' ' >> $LOGLOCATION4$BUSUBDIR.txt

#List timestamps
ssh backups ls -lt $BUDEST/* >> $LOGLOCATION4$BUSUBDIR.txt
ssh backups echo ' ' >> $LOGLOCATION4$BUSUBDIR.txt
ssh backups ls -lt $BUDEST2/* >> $LOGLOCATION4$BUSUBDIR.txt
ssh backups echo ' ' >> $LOGLOCATION4$BUSUBDIR.txt
ssh backups ls -lt $BUDEST3/* >> $LOGLOCATION4$BUSUBDIR.txt

#Email log to someone
ssh backups cat $LOGLOCATION4$BUSUBDIR.txt | mail -r $FEMAIL -s 'Backup Server Space and Time Check' $TEMAIL

What is happening is that the df/ls log is being written to the home directory on the LOCAL machine instead of on the server. Then when 'cat' tries to find the file to send it out, it reports that it doesn't exist. I have tried various combinations of quotes and stuff, but am having no luck... Any help would be greatly appreciated.