Shorthand for rear-echelon motherfucker, a service member posted or based well away from the front lines, particularly in the Vietnam War.
The grunts on patrol had no patience for the REMF who never left the base camp and spent his days counting supplies.