The diameter of an X-ray beam was determined, using the knife-edge technique, widely applied for beam profiling, by taking advantage of the fluorescence emission generated by the X-ray beam. The knife-edge has to be appropriate to the configuration of the device, in our case a double-material target made of plastic and cardboard was scanned in a transversal plane compared to the beam propagation direction. Along the scanning axis, for each position, the intensity of the Kα line of chlorine was recorded. The first derivative of the intensity evolution as a function of the edge position, fitted by a Gaussian function, makes it possible to obtain the beam diameter along the scan direction. We measured a slightly elliptic diameter close to 3 mm. In this note we underline the significance of the knife-edge technique which represents a useful tool, easy to be set up, to control X-ray beam dimensions in portable devices often routinely used by non-specialists.