Wednesday, June 11, 2014

Random commands

du -h -s *  
lists current directories and their sizes


grep -r "SEARCH STRING" /directory/name/*
search for a string inside files




hdparm -tT /dev/sda1
will give disk throughput speeds in MB/sec


find in files
grep -rn texttofind /path/to/search
r - recursive
n - show line number


replace in files
sed -i 's/original/new/g' filename









No comments:

Post a Comment