Linux Notes
Appearance
To Change the Command prompt[edit | edit source]
export PS1=': \!,$? ; '
To Display the current version of mythtv[edit | edit source]
$/usr/local/bin/mythbackend --version
To Display the installed rpm's[edit | edit source]
rpm -qa | grep <Program Name> rpm -qa | grep myth or rpm -qa | grep ivtv
To Display the current Libs being used by mythtv[edit | edit source]
ldd /usr/local/bin/mythfrontend | grep myth
Convert AVI files to MPG files[edit | edit source]
ffmpeg -i "file.avi" -target ntsc-svcd "file.mpg"
Combining 2 (or more) AVI files.[edit | edit source]
avimerge -o "bigfile.avi" -i tmp1.avi tmp2.avi ... ...
Check the speed of your harddrive[edit | edit source]
/sbin/hdparm -tT /dev/hda
To See the Size of any sub Directory's[edit | edit source]
du -h du -h --max-depth=1 (To show the size of the directory's in the current directory)
To See a list of open files[edit | edit source]
lsof lsof |grep filename
[edit | edit source]
mount -t cifs 192.168.1.3:Mythtv /mythtv -ouser=username,password=password mount -t cifs matthomevpc:Archive\ 2 /remote/Archive2 -ouser=Matt\ Rude,password=,uid=matt,gid=matt
Burn an ISO images[edit | edit source]
cdrecord -v -eject <ISO_NAME>.iso
Mount an ISO to the file system[edit | edit source]
mount -o loop -t iso9660 <ISO-DIR>/<ISO-NAME>.iso /<DIR-Name> mount -o loop -t iso9660 /mythtv/ISO/Fedora-8-i386-DVD.iso /var/ftp/f8
Check daylight savings time rules[edit | edit source]
/usr/sbin/zdump -v -c 2008 'America/Chicago'|grep 2007
Changing host a recording is on[edit | edit source]
From the directory that the recording are in run:
for m in `mysql -h 192.168.1.3 -u mythtv -pmythtv mythconverg -N -B -e "SELECT basename FROM recorded WHERE hostname = 'mythtv.mattrude.com' and storagegroup = 'Default';"` do if [ -f $m ]; then echo "$m is on this host, Updateing Database..." `mysql -h 192.168.1.3 -u mythtv -pmythtv mythconverg -N -B -e "UPDATE mythconverg.recorded SET hostname = 'desktop.mattrude.com', lastmodified = NOW( ) WHERE basename = '$m';"` else echo "$m is not stored on this host" fi done