#!/bin/bash cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies cd /sys/devices/system/cpu newSpeedTop=`awk '{print $2}' ./cpu0/cpufreq/scaling_available_frequencies` newSpeedBot=$newSpeedTop newSpeedBot=2000000 newSpeedTop=2000000 echo "new speed $newSpeedTop" for c in ./cpu[0-9]* ; do echo $newSpeedTop >${c}/cpufreq/scaling_max_freq echo $newSpeedBot >${c}/cpufreq/scaling_min_freq done