Carrier dynamics in bulk semiconductors and metals after ultrashort pulse excitation