LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 12-09-2006, 05:21 PM   #1
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
Odds and ends


I can't keep track of it all. So what I do is establish a file on my Home directory called Jims_HowTos. This file contains tips and things I have learned (usually the hard way), that I'll never remember unless I write them down.

Just for grins, here's a few of my odds and ends of things I've learned along the way.:



Two-pass rip of a .VOB file to a divx (mpg4) file using transcode:
transcode -a 0 -b 128,0,0 -i movie.vob -w 1800,250,100 -A -N 0x2000 -M 2 -Y 4,4,4,4 -B 1,11,8 -R 1 -x vob -y xvid4,null
transcode -a 0 -b 128,0,0 -i movie.vob -w 1800,250,100 -A -N 0x2000 -M 2 -Y 4,4,4,4 -B 1,11,8 -R 2 -x vob -y xvid4 -o movie.avi
One thing to note is that for DVDs, this will output the FPS to 29.97. If you want to do 23.97 (and you *know* the DVD is that framerate) then add "-f 24,1" to the mix of flags.

If your framerate is wrong, you'll notice pretty easily -- the video will skip a little bit though the audio will be fine.

One easy way to determine for sure what the FPS of the source video, is to actually play it with MPlayer where you can see the output.
-------------------------------------------------------------------------------------------------

To monitor system and file calls of a program, start it with strace myprog.

--------------------------------------------------------------------------------------------------

To create a block device for the zip drive when it doesn't get picked up by the system on startup:

go to /dev/ide. Create directory structure bus1/target0/lun0

Then use command mknod disc b 22 0

Note that major number can be obtained from /proc/devices and minor number simply means first device. Should also mknod part4 b 22 4 to pick up the partition on the zip disk.

Note change in mandriva 2007:

create device /dev/hdc as mknod hdc b 22 0
then create device /dev/hdc4 as mknod hdc4 b 22 4
then go into /dev/disk/by-path and create these links:
ln -s ../../hdc pci-0000:00:22.0-ide-1:0
ln -s ../../hdc4 pci-0000:00:22.0-ide-1:0-part4

I created a simple script to do this in init.d called mountzip

Then mount the zip disk

----------------------------------------------------------------------------------------------------------------------------------

Perl regex tutorial: man perlretut

-------------------------------------------------------------------------------------------------------

When changing nic that accesses internet in Linux, need to change samba, all the standard net connect stuff, and DON'T FORGET THE FIREWALL!!! (we are using endoshield)

-------------------------------------------------------------------------------------------------------

Kmail loses track of a mailbox. This usually means the index for that box is corrupt. The solution is to delete the index file(s) which are found in ~/.Mail then restart Kmail. This will cause it to recreate the index. This might happen if the HD runs out of space.

------------------------------------------------------------------------------------------------------

Problems with the system (./configure) finding the right gtk+-
I don't know what is happening here. But the solution is to enter this command:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
I should put that into the startup scripts.

---------------------------------------------------------------------------------------------------------

mounting a hd iso as a cdrom

establish mountpoint in /mnt or other place
mount -o loop -t iso9660 myiso.iso /mnt/isoimage/

---------------------------------------------------------------------------------------------------------

Sizing partitions, determining start and end using linux fdisk, and organizing so dd can image

fdisk -l will give an output that specifies the # heads, the # of sectors/track, and the number of cylinders on the drive. For each partition, fdisk will list the starting cylinder and the ending cylinder, and the size in sectors; by default the formatting tools will use cylinder boundaries. Linux uses sectors that are 1024 bytes, which is 2 - 512 byte blocks. dd wants the starting sector and the size of the partition, in appropriate units. Default size for dd is blocks of 512 bytes.

To get the starting sector of the partition, take the end cylinder of the previous partition. Multiply that number by the number of sectors/track, then by the number of heads. This gives the first sector of the last track of the previous partition. Now add in the number of sectors/track to this number and the result is the first sector of the first track of the first cylinder of the next partition.

To get the size of the partition, subtract the beginning cylinder from the end cylinder and add one (to get the cylinder count). Then multiply this number by the sectors/track and the # heads. Then subtract the sectors/track from the result to get the total sectors in the partition. The size of the partition may also be determined in sectors by taking the size listed by fdisk (in "blocks"), multiplying it by 2, and adding 1.

Alternatively, sfdisk -l -sf /dev/sd# will give the start block and size directly
 
Old 12-29-2006, 03:59 AM   #2
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
my favorite:

rm -rf *

(read mail, really fast, and all of it)
 
Old 01-28-2007, 09:08 AM   #3
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Original Poster
Rep: Reputation: 114Reputation: 114
Quote:
Originally Posted by dombrowsky
my favorite:

rm -rf *

(read mail, really fast, and all of it)
And for the benefit of any complete newbies who are reading this, if you really execute this command (as root) it will have the effect of deleting the entire hard drive
 
Old 01-28-2007, 09:47 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,112
Blog Entries: 54

Rep: Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784
More in the Tips and tricks thread...
 
  


Reply

Tags
howto, notes, random, reference


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you know file ends ? xiangbing Programming 7 02-21-2006 08:02 PM
Odds and ends errors..... DragonM15 Linux - Software 2 01-15-2006 02:36 AM
files the ends with .c maginotjr Programming 15 07-24-2005 01:06 PM
apache odds and evens.. miguetoo Linux - Software 1 11-23-2003 10:04 PM
When support ends.... what to do? bxb32001 Red Hat 15 11-02-2003 06:27 PM


All times are GMT -5. The time now is 07:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration