Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
Quoting Ken Bloom (kbl...@gmail.com): > A correct solution that covers all of the corner cases would be to > replace the glob with > > find -path './.*' -maxdepth 1 Elegant. I like this a lot. -- Rick Moen "You can stop running that response to Virginia's r...@linuxmafia.comletter about Santa. She's probably dead by now." McQ! (4x80) -- FakeAPStylebook ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
On Tue, 2011-01-18 at 19:00 -0800, Rick Moen wrote: > Quoting Chanoch (Ken) Bloom (kbl...@gmail.com): > > > He wants *only* the dotfiles (and none of the regular files) > [...] > > That's why he changed it to the following, which requires there be a > > non-dot character after the dot > > > > tar zcfv dotfiles.tar .[!.]* > > $ cd /tmp > $ touch ..foo > $ ls .[!.]* > $ > > ;-> > > (Yes, '.[!.]*' is nonethless a pretty good solution, among a myriad of > imperfect ones.) That is, unfortunately the problem with the shell -- the best you can come in most cases is an imperfect solution. Look how many answers people came up on StackOverflow when I asked the best way to tell whether or not a glob matched any files. http://stackoverflow.com/questions/2937407/test-whether-a-glob-has-any-matches-in-bash ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
On Tue, 2011-01-18 at 19:00 -0800, Rick Moen wrote: > Quoting Chanoch (Ken) Bloom (kbl...@gmail.com): > > > He wants *only* the dotfiles (and none of the regular files) > [...] > > That's why he changed it to the following, which requires there be a > > non-dot character after the dot > > > > tar zcfv dotfiles.tar .[!.]* > > $ cd /tmp > $ touch ..foo > $ ls .[!.]* > $ > > ;-> > > (Yes, '.[!.]*' is nonethless a pretty good solution, among a myriad of > imperfect ones.) A correct solution that covers all of the corner cases would be to replace the glob with find -path './.*' -maxdepth 1 ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
On 01/18/2011 06:40 PM, Chanoch (Ken) Bloom wrote: > On Tue, 2011-01-18 at 18:07 -0800, Bill Broadley wrote: > I think you're misreading his intent. Heh, worse, I didn't, but my test case didn't expose that it would slurp up normal files as well. So my mistake. [valid explanation snipped] > tar zcfv dotfiles.tar .[!.]* Indeed, I retract what I said and this looks like the best of the simple solutions. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
Quoting Chanoch (Ken) Bloom (kbl...@gmail.com): > He wants *only* the dotfiles (and none of the regular files) [...] > That's why he changed it to the following, which requires there be a > non-dot character after the dot > > tar zcfv dotfiles.tar .[!.]* $ cd /tmp $ touch ..foo $ ls .[!.]* $ ;-> (Yes, '.[!.]*' is nonethless a pretty good solution, among a myriad of imperfect ones.) -- Rick Moen"So, this SEO copywriter walks into a bar, grill, r...@linuxmafia.com pub, public house, Irish bar, bartender, drinks, McQ! (4x80) beer, wine, liquor." -- Michael Karlsson ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
On Tue, 2011-01-18 at 18:07 -0800, Bill Broadley wrote: > On 01/18/2011 03:43 PM, Brian Lavender wrote: > > tar cf dotfiles.tar .[!.]* || exit 2 > > I agreed with most of Brian's post, but the above seems unnecessarily complex > and useless. My best guess is that someone is paranoid, doesn't understand > that ".." is a special case, or maybe it's portable to some broken version of > tar like solaris's. > > To demonstrate: > bill@kona:~/tmp/t2$ tar cvzf ../t1.tar .[!.]* > .bar > .blarg > .foo > .zoop/ > bill@kona:~/tmp/t2$ tar cvzf ../t2.tar . > ./ > ./.foo > ./.bar > ./.blarg > ./.zoop/ > bill@kona:~/tmp/t2$ > > No protecting against ".." necessary. Nor would ~/..foo be accidentally > excluded (unlikely but legal). Nor am I sure what || exit 2 is supposed to > do. Well I know about return values... but why? > > Does anyone know of a Linux tar that doesn't behave like the above? I think you're misreading his intent. He wants *only* the dotfiles (and none of the regular files), so what he wants is tar zcf dotfiles.tar .* However, when you ask for .*, the expansion includes . so your entire home directory is tarred up in the tarball. He should change it to tar zcf dotfiles.tar .?* which will require at least an additional character. But when you do this, .. is included in the glob expansion, and so .. and all its children get included in the tarball. (Yes, I tested on GNU tar) That's why he changed it to the following, which requires there be a non-dot character after the dot tar zcfv dotfiles.tar .[!.]* ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
On 01/18/2011 03:43 PM, Brian Lavender wrote: > tar cf dotfiles.tar .[!.]* || exit 2 I agreed with most of Brian's post, but the above seems unnecessarily complex and useless. My best guess is that someone is paranoid, doesn't understand that ".." is a special case, or maybe it's portable to some broken version of tar like solaris's. To demonstrate: bill@kona:~/tmp/t2$ tar cvzf ../t1.tar .[!.]* .bar .blarg .foo .zoop/ bill@kona:~/tmp/t2$ tar cvzf ../t2.tar . ./ ./.foo ./.bar ./.blarg ./.zoop/ bill@kona:~/tmp/t2$ No protecting against ".." necessary. Nor would ~/..foo be accidentally excluded (unlikely but legal). Nor am I sure what || exit 2 is supposed to do. Well I know about return values... but why? Does anyone know of a Linux tar that doesn't behave like the above? Sure I might be more paranoid with rm -r .* (which is similarly protected). Certainly people are free to make their own choices, I just wanted to point out that the extra complexity doesn't seem to do anything useful... at least under linux. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
On Sun, Jan 16, 2011 at 10:55:40PM -0800, Alex Mandel wrote: > On 01/16/2011 10:40 PM, Bill Kendrick wrote: > > > > Long story shoty. I have a Kubuntu 9.04 install. Finally told it to upgrade, > > and it brought itself up to 9.10, and then I initiated an upgrade to 10.04. > > It started reporting errors, with the only options being "Report Bug" (which > > did nothing) and "Close" (dismiss error). > > > > It got through all of the pkgs in the "Upgrade" step (next step being > > "Cleanup") and complained that some stuff wasn't installed, and it would > > issue a "dpkg-reconfigure -a" or somesuch to fix itself. Dimissed that > > window, then the main window hung (blank). > > > > It's late, and it looked in a bad state, so I zapped it and rebooted. > > Now I'm landing im a shell upon reboot with a complaint about > > "mountall" not taking some argument or another. > > > > So... anybody got a 10.10 disc I can borrow? I'd like to boot into LiveCD > > mode, re-copy my home directory over to my NAS, and then wipe & reinstall. > > I'd love to get back up and running before Tuesday. Anyone got one I can > > grab in the morning? ;) > > > > This is the worst upgrade disaster I've witnessed. Stupid Ubuntu. :( > > > I can burn one for you in the morning. This is one reason why I do > separate partitions for / and /home. The separate /home is definitely a good idea. My idea is to just use a whole brand new disk and save the old one. I recently just bought a separate hard drive for 70 bucks, stuck it in my machine and then copied all my data from home back onto my newly installed system. This way, if I had something installed in /usr/local or the newly installed programs don't work, I can stick the old disk back in, and I am good to go. For instance, I am having problem with autoconf and the older version of nProbe that worked with my old system. Plus, I sometimes end up doing wierd things to my system where it doesn't work such as the "effects" for wobbly windows. I use this command to tar up those "dot" directories (Thanks to Chuck on lug-nuts). tar cf dotfiles.tar .[!.]* || exit 2 On the new system, I put the original "dot" directories in a separate area and restore them as I need them. brian -- Brian Lavender http://www.brie.com/brian/ "Keep your feet on the ground and keep reaching for the stars." --Kasey Kasem ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
Shouldn't need to be any particular variety of live cd, I would think, to copy files. "Bill Kendrick" wrote: >On Sun, Jan 16, 2011 at 10:55:40PM -0800, Alex Mandel wrote: >> I can burn one for you in the morning. This is one reason why I do >> separate partitions for / and /home. > >Cool, thanks. And yeah, lesson learned. :) > > >> Have you tried an apt-get dist-upgrade with a force option from the >> command line to see if it just needs to rerun or finish some stuff. >My >> upgrade along the same line went fine for my laptop a few months >back. > >Well at this point I'm dropped into a root shell, disk is read-only, >and things are borked (e.g., Vim doesn't run). So I figured a live CD >would >be the least frustrating situation to work off of. > >Thx! > >-bill! >___ >vox-tech mailing list >vox-tech@lists.lugod.org >http://lists.lugod.org/mailman/listinfo/vox-tech --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
On Sun, Jan 16, 2011 at 10:55:40PM -0800, Alex Mandel wrote: > I can burn one for you in the morning. This is one reason why I do > separate partitions for / and /home. Cool, thanks. And yeah, lesson learned. :) > Have you tried an apt-get dist-upgrade with a force option from the > command line to see if it just needs to rerun or finish some stuff. My > upgrade along the same line went fine for my laptop a few months back. Well at this point I'm dropped into a root shell, disk is read-only, and things are borked (e.g., Vim doesn't run). So I figured a live CD would be the least frustrating situation to work off of. Thx! -bill! ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] Ubuntu 10.04 LTS upgrade woes
On 01/16/2011 10:40 PM, Bill Kendrick wrote: > > Long story shoty. I have a Kubuntu 9.04 install. Finally told it to upgrade, > and it brought itself up to 9.10, and then I initiated an upgrade to 10.04. > It started reporting errors, with the only options being "Report Bug" (which > did nothing) and "Close" (dismiss error). > > It got through all of the pkgs in the "Upgrade" step (next step being > "Cleanup") and complained that some stuff wasn't installed, and it would > issue a "dpkg-reconfigure -a" or somesuch to fix itself. Dimissed that > window, then the main window hung (blank). > > It's late, and it looked in a bad state, so I zapped it and rebooted. > Now I'm landing im a shell upon reboot with a complaint about > "mountall" not taking some argument or another. > > So... anybody got a 10.10 disc I can borrow? I'd like to boot into LiveCD > mode, re-copy my home directory over to my NAS, and then wipe & reinstall. > I'd love to get back up and running before Tuesday. Anyone got one I can > grab in the morning? ;) > > This is the worst upgrade disaster I've witnessed. Stupid Ubuntu. :( > I can burn one for you in the morning. This is one reason why I do separate partitions for / and /home. Have you tried an apt-get dist-upgrade with a force option from the command line to see if it just needs to rerun or finish some stuff. My upgrade along the same line went fine for my laptop a few months back. Thanks, Alex ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech