Skip to main content

Posts

Showing posts from April, 2012

Split and merge files

source: http://linuxpoison.blogspot.com/2008/09/split-and-merge-large-files.html split --bytes=1024m bigfile.iso small_file_ That command will split bigfile.iso into files that are 1024 MB in size (1GB) and name the various parts small_file_aa, small_file_ab, etc. You can specify b for bytes, k for Kilobytes and m for Megabytes to specify sizes. To join the files back together on Linux: cat small_file_* > joined_file.iso If it was a video file and the file would not seek then VLC can fix the video index or even better use mencoder -idx inputfile.avi outpufile.avi to regenerate the avi index

Real time temperature monitor

CAUTION : The following script might damage/burn the laptop if used incorrectly. Requires : sensors-detect , gnuplot CAUTION : The following script might damage/burn the laptop if used incorrectly. An easier way would be to use Psensor http://www.ubuntugeek.com/psensor-a-graphical-temperature-monitor.html but I want to do this manually to have greater control. The temperature monitor script -------------------------------- #!/bin/bash # CPU temperature monitor script # do not have to edit beyond this line #------------------------------------------ if [ "$1" == "kill" ] then # if command line parameter is "kill" then kill all running instances of this script. nnn=`ps aux | grep $0 | tr -s " " | cut -d" " -f2 ` echo -e $$ "\n====" # prints PID of this instance of script. make sure not to kill itself. for ii in `echo $nnn` do if [ "$ii" -ne "$$" ] then echo "Killing PID:" $