We consider three different systems in a heat flow: an ideal gas, a van der Waals gas, and a binary mixture of ideal gases. We divide each system internally into two subsystems by a movable wall. We show that the direction of the motion of the wall, after release, under constant boundary conditions, is determined by the same inequality as in equilibrium thermodynamics dU-đQ≤0. The only difference between the equilibrium and non-equilibrium laws is the dependence of the net heat change, đQ, on the state parameters of the system. We show that the same inequality is valid when introducing the gravitational field in the case of both the ideal gas and the van der Waals gas in the heat flow. It remains true when we consider a thick wall permeable to gas particles and derive Archimedes' principle in the heat flow. Finally, we consider the Couette (shear) flow of the ideal gas. In this system, the direction of the motion of the internal wall follows from the inequality dE-đQ-đWs≤0, where dE is the infinitesimal change in total energy (internal plus kinetic) and đWs is the infinitesimal work exchanged with the environment due to the shear force imposed on the flowing gas. Ultimately, we synthesize all these cases within a general framework of the second law of non-equilibrium thermodynamics.