Re: cut(1) and space delimiters
On 2010-03-19 21:54, Mike Viau wrote: Fri, 19 Mar 2010 21:34:47 -0500 wrote: Googled and followed examples, which work, but my specific problem doesn't work... WORKS: $ service="http mail ssh" $ echo $service | cut -d\ -f2 mail $ echo $service | cut -d' ' -f2 mail dpkg --get-selections | grep -v deinstall$ | awk '{print $1}' DOES NOT WORK: $ dpkg --get-selections | grep -v deinstall$ | cut -d' ' -f1 $ dpkg --get-selections | grep -v deinstall$ | cut -d\ -f1 Is the problem that there's so *much* whitespace in the dpkg listing? Firstly I am no pro at string manipulation but the working examples seems to have no line feed characters, whereas the "dpkg --get-selections" creates a new line for every package it prints. In Unicode (linux) LF:Line Feed, U+000A I tried "dpkg --get-selections | grep -v deinstall$ | cut -d'\n' -f1" but still had not luck though... The newline should have no effect. This, for example, works perfectly: $ apt-show-versions -u | cut -d/ -f1 -- Obsession with "preserving cultural heritage" is a racist impediment to moral, physical and intellectual progress. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba43a2a.6080...@cox.net
Re: How to reduce a debian system to a base system
On Fri March 19 2010 19:14:21 Mike Viau wrote: > > Date: Fri, 19 Mar 2010 14:48:02 -0700 wrote: > > > > On Fri March 19 2010 12:55:47 Mike Viau wrote: > > > I was looking for a way to purge or remove all the packages that were > > > installed on a Debian system after the initial (bare bone) minimal > > > system installation. I have searched on Google for "How to reduce a > > > Debian system to a base system" but it seems like the topic of interest > > > was to reduce the memory consumption of the installed system, which is > > > not my consern. > > > > > > In essence I would like to revert my system back to a freshly installed > > > state, without reinstalling. Ultimatly is this possible? > > > > Assuming your bare bones --get-selections file is called bbs: > > > > dpkg --dry-run --purge $(join -v2 <(awk '{if ($2=="install") print $1}' > > > $1}' | sort)) > > > > Remove "--dry-run" at your own peril once you're happy with the proposed > > actions. > > > > You may need to run it a couple or three times but that should do it. > > > > --Mike Bird > > My output with the suggestion above. > > > debian:~# dpkg --dry-run --purge $(join -v2 <(awk '{if ($2=="install") > print $1}' < debian-5.04-base-selections | sort) < (dpkg --get-selections | > awk '{if ($2=="install") print $1}' | sort)) bash: command substitution: > line 1: syntax error near unexpected token `(' bash: command substitution: > line 1: `join -v2 <(awk '{if ($2=="install") print $1}' < > debian-5.04-base-selections | sort) < (dpkg --get-selections | awk '{if > ($2=="install") print $1}' | sort)' dpkg: --purge needs at least one > package name argument > > Type dpkg --help for help about installing and deinstalling packages [*]; > Use `dselect' or `aptitude' for user-friendly package management; > Type dpkg -Dhelp for a list of dpkg debug flag values; > Type dpkg --force-help for a list of forcing options; > Type dpkg-deb --help for help about manipulating *.deb files; > Type dpkg --license for copyright license and lack of warranty (GNU GPL) > [*]. > > Options marked [*] produce a lot of output - pipe it through `less' or > `more' ! debian:~# Your command has a superfluous space between "<" and "(". Works for me when the extra space is removed. --Mike Bird -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201003192002.56226.mgb-deb...@yosemite.net
Re: How to reduce a debian system to a base system
On 2010-03-19 21:26, Mike Viau wrote: Date: Fri, 19 Mar 2010 21:13:49 -0500 wrote: [snip] I see no purpose, when you can do this at any time: COLUMNS=180 dpkg -l | grep ^i | \ cut -c4-44 > installed.packages.`date +"%Y%M%d-%H%m"` Since that's obviously a pain to write, put it in an alias. -- Ron, How would you revert your system to using only the packages mentioned in your snapshot? I'd take a current snapshot list and diff it with the previous list to know what to get rid of. Then apt-get install $(cat packages.to.delete.txt) I'm sure that can be automated with a shell script. aptitude might have a log file somewhere which list what you just installed. Your output looks identical to "dpkg--get-selections" without the word install on each line. Yup. -- Obsession with "preserving cultural heritage" is a racist impediment to moral, physical and intellectual progress. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba43b9a.3060...@cox.net
[Semi-OT] Difficulties in moving to Linux (was Re: (OT) gnash vs. flash ...)
On 2010-03-18 03:41, Andrei Popescu wrote: On Thu,18.Mar.10, 03:28:40, Ron Johnson wrote: The main problem is all the 3rd party applications written specifically for Word and Excel which have no analog in the OOo world. Interesting, I didn't come across such things in my company Also is the tight integration w/ other MSFT products like SQL Server, Exchange and SharePoint. There are slso some functions in Excel that are missing from OOo Calc, and Presentation probably isn't as full-featured as Powerpoint. Are those features *really* needed? (just asking, I don't have much experience here) http://www.h-online.com/open/news/item/LiMux-project-management-We-were-naive-958824.html http://www.floschi.info/2010/03/quality-over-time-in-munich/ -- Obsession with "preserving cultural heritage" is a racist impediment to moral, physical and intellectual progress. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba440c9.3080...@cox.net
RE: [SOLVED] How to reduce a debian system to a base system
Fri, 19 Mar 2010 20:02:56 -0700 wrote: > > On Fri March 19 2010 19:14:21 Mike Viau wrote: > > > Date: Fri, 19 Mar 2010 14:48:02 -0700 wrote: > > > > > > On Fri March 19 2010 12:55:47 Mike Viau wrote: > > > > I was looking for a way to purge or remove all the packages that were > > > > installed on a Debian system after the initial (bare bone) minimal > > > > system installation. I have searched on Google for "How to reduce a > > > > Debian system to a base system" but it seems like the topic of interest > > > > was to reduce the memory consumption of the installed system, which is > > > > not my consern. > > > > > > > > In essence I would like to revert my system back to a freshly installed > > > > state, without reinstalling. Ultimatly is this possible? > > > > > > Assuming your bare bones --get-selections file is called bbs: > > > > > > dpkg --dry-run --purge $(join -v2 <(awk '{if ($2=="install") print $1}' > > > > > $1}' | sort)) > > > > > > Remove "--dry-run" at your own peril once you're happy with the proposed > > > actions. > > > > > > You may need to run it a couple or three times but that should do it. > > > > > > --Mike Bird > > > > My output with the suggestion above. > > > > > > debian:~# dpkg --dry-run --purge $(join -v2 <(awk '{if ($2=="install") > > print $1}' < debian-5.04-base-selections | sort) < (dpkg --get-selections | > > awk '{if ($2=="install") print $1}' | sort)) bash: command substitution: > > line 1: syntax error near unexpected token `(' bash: command substitution: > > line 1: `join -v2 <(awk '{if ($2=="install") print $1}' < > > debian-5.04-base-selections | sort) < (dpkg --get-selections | awk '{if > > ($2=="install") print $1}' | sort)' dpkg: --purge needs at least one > > package name argument > > > > Type dpkg --help for help about installing and deinstalling packages [*]; > > Use `dselect' or `aptitude' for user-friendly package management; > > Type dpkg -Dhelp for a list of dpkg debug flag values; > > Type dpkg --force-help for a list of forcing options; > > Type dpkg-deb --help for help about manipulating *.deb files; > > Type dpkg --license for copyright license and lack of warranty (GNU GPL) > > [*]. > > > > Options marked [*] produce a lot of output - pipe it through `less' or > > `more' ! debian:~# > > Your command has a superfluous space between "<" and "(". Works for me > when the extra space is removed. > > --Mike Bird > > > -- You are correct! Thanks. -M _ Live connected with Messenger on your phone http://go.microsoft.com/?linkid=9712958
RE: How to reduce a debian system to a base system
Fri, 19 Mar 2010 22:06:02 -0500 wrote: > On 2010-03-19 21:26, Mike Viau wrote: > >> Date: Fri, 19 Mar 2010 21:13:49 -0500 wrote: > [snip] > >> > >> I see no purpose, when you can do this at any time: > >> COLUMNS=180 dpkg -l | grep ^i | \ > >> cut -c4-44 > installed.packages.`date +"%Y%M%d-%H%m"` > >> > >> Since that's obviously a pain to write, put it in an alias. > >> > >> > >> -- > > > > Ron, > > > > How would you revert your system to using only the packages mentioned in > > your snapshot? > > I'd take a current snapshot list and diff it with the previous list > to know what to get rid of. Then > apt-get install $(cat packages.to.delete.txt) > > I'm sure that can be automated with a shell script. > > aptitude might have a log file somewhere which list what you just > installed. Aptitude does log the packages that it installs at /var/log/aptitude. Text manipulation appears like it will have be more complex here as compared to messing with dpkg outputs. Additionally installation performed by apt-get do not appear in the aptitude log file. > > > Your output looks identical to "dpkg--get-selections" without the word > > install on each line. > > > > Yup. > > -- > Obsession with "preserving cultural heritage" is a racist impediment > to moral, physical and intellectual progress. > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > Archive: http://lists.debian.org/4ba43b9a.3060...@cox.net > _ Check your Hotmail from your phone. http://go.microsoft.com/?linkid=9712957
Re: cut(1) and space delimiters
Am 19. Mär, 2010 schwätzte Ron Johnson so: Googled and followed examples, which work, but my specific problem doesn't work... WORKS: $ service="http mail ssh" $ echo $service | cut -d\ -f2 mail $ echo $service | cut -d' ' -f2 mail dpkg --get-selections | grep -v deinstall$ | awk '{print $1}' DOES NOT WORK: $ dpkg --get-selections | grep -v deinstall$ | cut -d' ' -f1 $ dpkg --get-selections | grep -v deinstall$ | cut -d\ -f1 Is the problem that there's so *much* whitespace in the dpkg listing? dpkg is outputting tabs. Cut uses a tab as the default delimiter :). dpkg --get-selections | grep -v deinstall$ | head -2 | cut -f1 a2ps abook ciao, der.hans -- # http://www.LuftHans.com/Classeshttp://www.TwoGeekTechs.com/ # Director of Engineering, FonWallet Transaction Solutions, Inc. # "The babys blood type? Human, mostly." -- Orson Scott Card
Re: Theoretical drive swapidge.
Ron Johnson put forth on 3/19/2010 2:24 AM: > 7200RPM (remember, that's 1200RPS) drives get *hot*. I wouldn't put one > in a laptop. (It's one of the tradeoffs you make for buying something > that small.) Ron, your calculator is borked. A 7200 rpm drive spins at 120 rotations per second, not 1200. And they don't get all that hot, nothing like a CPU or GPU IC. My WD 500GB 7.2K SATA runs a pretty constant 26C (95F)--lower than core human body temperature. This is a 3.5" drive in a server vs a 2.5" drive in a laptop, but as another OP noted, his laptop 7.2K drive only runs about 10C hotter due to the constricted airflow environment. 15K rpm drives are the really hot ones. And you won't find one in a laptop any time soon. An SSD of equivalent capacity is about the same price as a 15K drive anyway and much more thermally friendly. -- Stan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba449f1.9090...@hardwarefreak.com
Re: grub2; unknown command initrd
2010/3/20 Tom H > > I have debian 5 on /dev/sda1 and ubuntu 10.04 on /dev/sda3 > > here are my grub.cfg > > ### BEGIN /etc/grub.d/10_linux ### > > menuentry "Debian GNU/Linux, linux 2.6.26-2-amd64" { > > set root=(hd0,1) > > search --fs-uuid --set da13d632-e65a-4128-9b06-0ec24a5d390f > > linux /boot/vmlinuz-2.6.26-2-amd64 > > root=UUID=da13d632-e65a-4128-9b06-0ec24a5d390f ro > > initrd /boot/initrd.img-2.6.26-2-amd64 > > } > > ### END /etc/grub.d/10_linux ### > > ### BEGIN /etc/grub.d/30_os-prober ### > > ### END /etc/grub.d/30_os-prober ### > > ### BEGIN /etc/grub.d/40_custom ### > > menuentry "Ubuntu, with Linux 2.6.32-15-generic" { > > insmod ext2 > > set root=(hd0,3) > > search --no-floppy --fs-uuid --set 76fe9a67-1168-4154-b994-4b466e92f7df > > linux /boot/vmlinuz-2.6.32-15-generic > > root=UUID=76fe9a67-1168-4154-b994-4b466e92f7df ro quiet splash > > initrd /boot/initrd.img-2.6.32-15-generic > > } > > ### END /etc/grub.d/40_custom ### > > whenever i choose to boot ubuntu, i got "unknown comand 'initrd' " but it > is > > fine when i boot debian but not after i failed to boot ubuntu, debian > would > > fail to boot too with the same message. How do i go about this? > > 1. Don't you have os-prober installed? Why is Ubuntu in the 40_custom > section? > > before going to number 2, is there any other way because os-prober did not detect ubuntu on /dev/sda3 i experimented by adding below in /etc/grub.d/device.map (hd0,3) /dev/sda3 and update-grub2 says it could not find that partition > 2. can you boot from Ubuntu if you add > insmod linux > between > search --no-floppy --fs-uuid --set 76fe9a67-1168-4154-b994-4b466e92f7df > and > linux /boot/vmlinuz-2.6.32-15-generic > root=UUID=76fe9a67-1168-4154-b994-4b466e92f7df ro > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact > listmas...@lists.debian.org > Archive: > http://lists.debian.org/6d4219cc1003191818i22c398fjabc1297f03eec...@mail.gmail.com > > -- Regards, Umarzuki Mochlis http://debmal.my
Re: cut(1) and space delimiters
On Fri, Mar 19, 2010 at 09:34:47PM -0500, Ron Johnson wrote: > Googled and followed examples, which work, but my specific problem > doesn't work... > > WORKS: > $ service="http mail ssh" > $ echo $service | cut -d\ -f2 > mail > $ echo $service | cut -d' ' -f2 > mail > dpkg --get-selections | grep -v deinstall$ | awk '{print $1}' > > > DOES NOT WORK: > $ dpkg --get-selections | grep -v deinstall$ | cut -d' ' -f1 > $ dpkg --get-selections | grep -v deinstall$ | cut -d\ -f1 > > > Is the problem that there's so *much* whitespace in the dpkg listing? Two things are biting you. First, on my system, 'dpkg --get-selections | head -n1 | hd' shows tabs not spaces. so use dpkg --get-selections | grep -v deinstall$ | cut -f1 The cut man page says tab is the default delimiter Second, "cut -d' '" requires one space separating each field. You could also use either of these: dpkg --get-selections | grep -v deinstall$ | awk '{print $1;}' dpkg --get-selections | grep -v deinstall$ | perl -nale' print $F[0];' Mike -- Satisfied user of Linux since 1997. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20100320060118.ga3...@playground.mcclains.net