I have a find command that gives the list of files that are older than 5 days, i can tee it into a text file.
find . -type f -mtime +5 -ls | tee $dir/new.txt
Now i want to send this text file to a remote server into a dir. How do i do that.
I got what i wanted using this:
find . -type f -mtime +5 -ls | ssh remoteuser@remoteserver "cat >> $dir/new1.txt"