Podcast RSS Feeds

LHS Voice Line

+1-909-LHS-SHOW
Call us and leave a message with your questions, thoughts or suggestions and we'll put you on the air!

Join the Mailing List

Stay up to date with important information about the show, contests, live events and more. CLICK HERE to subscribe.

Become a Member

Membership has its rewards. Sign up for less than $2.00 per month and receive members-only content, free swag and more. CLICK HERE for details.

Please Visit Our Sponsor

LHS Episode #095: I Has the Dumb

Richard called this one of our best efforts to date, which means there must be some kind of worthwhile contained buried in all the tomfoolery somewhere. If you can find it, you'll be that much wiser for whatever it is we discussed. Silliness aside, we discuss some proposed FCC rule changes for the amateur radio community, the difference between hard and soft (symbolic) linking for our Linux segment, and answer questions and receive praise from several members of our audience. On the whole it turned out to be a pretty good episode, and we sure had a lot of fun doing it. Thanks to all our listeners for your support and for keeping us motivated to bring you ever more episodes of Linux in the Ham Shack.

73 de The LHS Guys

1 comment to LHS Episode #095: I Has the Dumb

  • I’m listening to #95 and want to try to explain symbolic/hard links. I think I’ll throw in copies too because I like to write too much.

    Copy a file, you get two files. That same information now takes twice as much space on your hard drive because you are storing it twice. Make a change to one, and the old one stays the same.

    Make a link to a file rather than copying it and you still really have one file, it just shows up in two places. It takes up barely any more space than it did to start with. Edit it in one spot, it ‘may’ be changed in both (I’ll get to that may part).

    To keep things complicated there are two kinds of links, hard, soft.

    Soft links just store the path to the original file. Ex, if Richard has a file called badger in /home/richard and makes a link to it called super_badger then if you looked at the ones and zeros on the hard drive super_badger would be a file containing ‘/home/richard/super_badger’.

    If Richard tries to open super_badger in emacs (because vi sucks 😀 ) he will actually end up opening badger. If he makes any changes and saves it then he will see those changes next time regardless of if he opens badger or super_badger he will see the changed version. There is still only one file.

    If Richard deletes badger then super_badger is still there but it is broken because it points to a file that no longer exists. He will not be able to open super_badger anymore. If he does an ls he will still see super_badger and depending on his color settings it will probably be red or blink or something to let him know something evil has happened and he lost his badger.

    Richard also could have made a hard link to badger. If super_badger is a hard link then it doesn’t contain ‘/home/richard/badger’. Instead it contains stuff most of us don’t want to know about like head, sector, etc… it’s the actual location on his hard drive where badger is located.

    Things still work the same way at first, the data is only stored in one place, only takes up about the same amount of space. If he fires up his trusty emacs it doesn’t matter if he opens badger or super_badger, he gets the same thing.

    But.. if he tries to delete badger nothing bad happens to super_badger. Because super_badger still points to that same space on his hard drive the data doesn’t get deleted, only the ‘pointer’ to it called badger is gone.

    Here’s the weirder part though… say he didn’t delete badger and instead he starts making changes to it. When badger is re-saved the operating system may decide to store it in a different place on his hard drive. Since super_badger still points to the old location now he might end up with two badgers!

    Last difference but not least, since hard links only store where on the hard disk the file is located, not which disk it is on they only work if both the original and the hard link are on the same filesystem. Since symbolic links are paths and just about anything can be mounted into the same tree those can point to files on different devices.

    Ok, Bill came in and filled most of this in after I started typing it up. Oh well, why waste a wasted effort, I’ll submit anyway. Thanks for the podcast guys!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Time limit is exhausted. Please reload CAPTCHA.