  We present a comprehensive statistical analysis of Swift X-ray light-curves
of Gamma-Ray Bursts (GRBs) collecting data from more than 650 GRBs discovered
by Swift and other facilities. The unprecedented sample size allows us to
constrain the REST FRAME X-ray properties of GRBs from a statistical
perspective, with particular reference to intrinsic time scales and the
energetics of the different light-curve phases in a common rest-frame 0.3-30
keV energy band. Temporal variability episodes are also studied and their
properties constrained. Two fundamental questions drive this effort: i) Does
the X-ray emission retain any kind of "memory"of the prompt gamma-ray phase?
ii) Where is the dividing line between long and short GRB X-ray properties? We
show that short GRBs decay faster, are less luminous and less energetic than
long GRBs in the X-rays, but are interestingly characterized by similar
intrinsic absorption. We furthermore reveal the existence of a number of
statistically significant relations that link the X-ray to prompt gamma-ray
parameters in long GRBs; short GRBs are outliers of the majority of these
2-parameter relations. However and more importantly, we report on the existence
of a universal 3-parameter scaling that links the X-ray and the gamma-ray
energy to the prompt spectral peak energy of BOTH long and short GRBs:
E_{X,iso}\propto E_{gamma,iso}^{1.00\pm 0.06}/E_{pk}^{0.60\pm 0.10}.
