Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Neil Bothwick
On Sat, 16 Jul 2011 14:13:49 -0400, Michael Orlitzky wrote:

 CFLAGS=-march=native -O2 -pipe enables everything safe these days.

As long as you don't want the VM to be portable.


-- 
Neil Bothwick

Angular Momentum Makes The World Go 'Round


signature.asc
Description: PGP signature


Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Kfir Lavi
On Sat, Jul 16, 2011 at 9:13 PM, Michael Orlitzky mich...@orlitzky.comwrote:

 On 07/16/2011 09:54 AM, Kfir Lavi wrote:
  Hi,
  I'm creating a router based on Gentoo, that needs to run as a vm using
  qemu.
  The mother machine will be Core I7 4 cores.
  What cpu and CFLAGS should I use to get the best performance out of this
 vm?
 
  Thanks,
  Kfir

 CFLAGS=-march=native -O2 -pipe enables everything safe these days.

 Hi,
I think -march=native is a problem, as it will compile for my cpu.
Qemu has different CPU, and i would like to compile my code to suit the vm
environment
as close as possible.

Kfir


Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread dong l
qemu has an option `*qemu* -*cpu host` that will use the host cpu features*

2011/7/17 Kfir Lavi lavi.k...@gmail.com



 On Sat, Jul 16, 2011 at 9:13 PM, Michael Orlitzky mich...@orlitzky.comwrote:

 On 07/16/2011 09:54 AM, Kfir Lavi wrote:
  Hi,
  I'm creating a router based on Gentoo, that needs to run as a vm using
  qemu.
  The mother machine will be Core I7 4 cores.
  What cpu and CFLAGS should I use to get the best performance out of this
 vm?
 
  Thanks,
  Kfir

 CFLAGS=-march=native -O2 -pipe enables everything safe these days.

 Hi,
 I think -march=native is a problem, as it will compile for my cpu.
 Qemu has different CPU, and i would like to compile my code to suit the vm
 environment
 as close as possible.

 Kfir



Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Albert Hopkins


On Saturday, July 16 at 16:54 (+0300), Kfir Lavi said:


 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this vm?

A router is not going to be CPU-bound.  Should matter little either way.




Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Michael Mol
On Sun, Jul 17, 2011 at 8:02 AM, Albert Hopkins mar...@letterboxes.org wrote:
 On Saturday, July 16 at 16:54 (+0300), Kfir Lavi said:
 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this vm?

 A router is not going to be CPU-bound.  Should matter little either way.

I agree it's not likely to matter significantly. In a VM environment,
though, it could conceivably be routing traffic between other VM
guests, and the nature of their locality could easily result in higher
traffic flows than you'd ever see running across a wire. Depends on
the use case, I imagine.

-- 
:wq



Re: [gentoo-user] Anyone got any older Portage snapshots kicking around?

2011-07-17 Thread Stroller

On 16 July 2011, at 19:11, Michael Orlitzky wrote:
 On 07/16/2011 12:53 PM, Stroller wrote:
 
 I have no illusions that attempting this *will* be a pain the ass,
 because in the past I've updated machines which have been ignored for
 18 months, and that required lots of manually digging in the Portage
 CVS attic and copying files into the local overlay by hand.
 
 
 Couldn't you just extract a stage3/snapshot in the root, and then emerge
 -e world? I haven't tried it naturally, but it sounds like a good idea
 to me at this moment.

I guess it may be irrational of me, but I'd really rather not do this because I 
fear architecture issues with the binaries. I mean, I guess that generic PPC64 
binaries should work, and that's what I'll actually end up compiling myself, 
but I'd still be happier with ones that have been *built* on (or specifically 
for) a cell.

Stroller.




Re: [gentoo-user] Anyone got any older Portage snapshots kicking around?

2011-07-17 Thread Stroller

On 16 July 2011, at 19:37, Alan Mackenzie wrote:
 ...
 I have a /usr/portage from 2009-12-20 on my rescue system.  I don't
 think I've synched it after that (but I'm too lazy to look up the `find'
 info page to check properly).
 
 Is that any good?

Yeah, that would be fantastic, thanks, Alan.

Could you possibly tar it up and stick it somewhere for me to download?

 As a matter of interest, how, exactly, are you going to use the old
 portage?  Is it a matter of updating in two moderate chunks rather than
 everything at once?

Yes, basically.

If I were to `emerge --sync` today and try to `emerge -u world` I would get 
loads of blockers where the current version of package X depends on package Y 
version  2.15. But only version 1.1 of package Y is installed, and the latest 
version depends on some much newer version of package Z. And the latest version 
of package Z depends upon something else… 

That's the easy part. What tends to happen as you dig through these is that 
you'll get a bunch of compile time errors because of package version 
incompatibilities, ones that are undocumented or not listed as version 
dependencies because no-one ever tried the latest version of package X with a 3 
year old version of library Y before.

And I think you also tend to get middle ground problems where one package 
needs a version of another that is higher than 1.1 but lower than 2.5 and 
neither version are in the tree any more.

I've only done this a couple of times, and never with such a large leap as 
would be required for this system. But each time I really had to play it by 
ear, got really ugly compile-time package failures and had to sort them out by 
digging around in the Portage CVS attic. It's not really difficult (for an 
experienced Gentoo admin) it's just a royal pain, and pretty frustrating (as 
you solve one problem, only to run into another). And it seemed like trying to 
be too aggressive in the resolution of the problems made them worse.

So, yes, what I would ideally like to do is update this 6 months at a time. I 
can find a Portage tree that is 6 months newer than the currently installed 
system, then all the packages in the new tree will probably have been tested 
(documented deps c, clean upgrade path) with the older ones on the system - 
the versions would have been tested by the Gentoo devs contemporaneously when 
they were originally in the Portage tree together. When the system is working 
with the 6 months newer packages, `emerge -e world` (to get *everything* up to 
date with that time snapshot) and then do the same for a tree another 6 months 
newer.

This all sounds very time consuming. But updating a typical Gentoo system that 
is 6 months old doesn't usually present too many problems - the time consuming 
part is the compilation, which can be left running overnight.

Stroller.




Re: [gentoo-user] Anyone got any older Portage snapshots kicking around?

2011-07-17 Thread Stroller

On 16 July 2011, at 20:14, Mark Knecht wrote:
 On Sat, Jul 16, 2011 at 9:53 AM, Stroller
 strol...@stellar.eclipse.co.uk wrote:
 A bit of a long shot, this, but has anyone got any older Portage snapshots 
 kicking around, by any chance?
 
 
 Amazingly enough, I have portage.latest.tar.bz2 dated March 30th,
 2010. Would that help?


Yeah, that would be fantastic, thanks. Could you put it somewhere I can 
download it from, please?

Stroller.




Re: [gentoo-user] Anyone got any older Portage snapshots kicking around?

2011-07-17 Thread Stroller

On 16 July 2011, at 21:57, James Cloos wrote:

 I have a clone of the git conversion whose last commit is dated
 Sun Apr 12 21:54:28 2009 +, if that is of any help.

Yeah, that would be fantastic, thanks. Could you put it somewhere I can 
download it from, please?

Feel free to email me directly, rather than everyone cluttering the list with 
URLs that no-one else will ever use.

Stroller.




Re: [gentoo-user] Anyone got any older Portage snapshots kicking around?

2011-07-17 Thread Stroller

On 16 July 2011, at 22:00, Volker Armin Hemmann wrote:
 ...
 deinstall everything you don't need to install the rest. Then update that 
 base 
 system. Afterwards install all the stuff you need.
 
 The less packages installed, the easier the update.

Excellent point! Thank you.

I think once or twice when I did this before I spent time messing around with 
jpeg libraries, which are not necessary to upgrade a compiler + base system.

Stroller.




Re: [gentoo-user] Anyone got any older Portage snapshots kicking around?

2011-07-17 Thread Stroller

On 17 July 2011, at 00:22, James wrote:
 Stroller stroller at stellar.eclipse.co.uk writes:
 
 in this case the box in question is a PS3 which was installed using the
 experimental PS3 stages 
 
 
 Hello Stroller,
 
 I do not have what you seek, but I did run across this link, some
 time ago, which might make your efforts much easier to install on 
 the PS3:
 
 
 http://www.edn.com/article/518212-The_Sony_PlayStation_3_hack_deciphered_what_consumer_electronics_designers_can_learn_from_the_failure_to_protect_a_billion.php

Yeah, I'm aware of this news. 

The thing is that I'm one of the rare people who never upgraded their PS3 to 
the first firmware upgrade (3.15?) which removed Linux capabilities.

So I am still legal by Sony's definition of the term (much as I disagree with 
these policies), and would prefer to stay this way.

AIUI there are a bunch of custom firmwares about, either for installing cool 
media players (or piracy tools) under GamesOS, and some more custom firmwares 
aimed at making Linux more powerful (by removing the hypervisor restrictions 
upon it).

But I really don't want to install these in case I decide at some point in the 
future that I want to install the latest official Sony firmware and Sony 
detects I've been running pirate games and bans the console from the gaming 
network.

Really, there's no need to update the PS3's firmware because it does everything 
I need at the moment. The firmware version has no bearing to the existing Linux 
installation.

Hope this makes sense. Not a criticism of you, and thanks for trying to be 
helpful.

Stroller.




Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Stroller

On 17 July 2011, at 13:02, Albert Hopkins wrote:
 On Saturday, July 16 at 16:54 (+0300), Kfir Lavi said:
 
 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this vm?
 
 A router is not going to be CPU-bound.  Should matter little either way.

A router is not going to be CPU-bound *on the most modern of hardware*, with no 
other load.

An old WRT54G will be CPU-bound on the latest high speed home connections (c 
40meg), and I have at least one older PC, maybe 10 years old, still in use, on 
which performance could be an issue.

Your statement may apply to Kfir's Core I7 system, but it one should be careful 
against making such bold statements, less words like not be misunderstood be 
to mean never.

Stroller.




Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Daniel da Veiga
On Sat, Jul 16, 2011 at 10:54, Kfir Lavi lavi.k...@gmail.com wrote:

 Hi,
 I'm creating a router based on Gentoo, that needs to run as a vm using
 qemu.
 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this
 vm?


If you intend to run this VM on different hardware or distribute it in any
way (so you don't really know on what hardware it will run) your best bet is
to set a generic arch like i686 or lower, OR hope the VM is run on software
based emulation (slow) so you don't have to worry about what CPU is running
it.

From my experience with qemu, you'll have a lot of requirements too, like
bridging and kernel module for virtual interfaces (tun/tap).

Now, if this will run on your machine, with kqemu, you'll set march on your
guest  as your host is...

-- 
Daniel da Veiga


Re: [gentoo-user] Re: Problem with xf86-video-ati nvidia-drivers

2011-07-17 Thread Grant
 I gave it a try but there was no change.  I tried plugging the TV and
 computer into a power strip and also into an isolation transformer.
 Any other ideas?

 I still think it's a driver problem.  Again: it's *physically* impossible to
 have these problems with the HDMI signal.  At most you get digital noise,
 which means some pixels get stuck or are missing.  But not what you get;
 that's just something that can't be explained.

I was thinking about this.  The digital HDMI signal must be converted
into an analog signal at some point if it's being represented as light
on a TV screen.  Electrical interference generated by the computer and
traveling up the HDMI wire should have its chance to affect things
(i.e. create weird shadows) at that point, right?

- Grant



Re: [gentoo-user] best cflags and cpu for gentoo qemu virtual machine

2011-07-17 Thread Kfir Lavi
On Sun, Jul 17, 2011 at 7:19 PM, Daniel da Veiga danieldave...@gmail.comwrote:

 On Sat, Jul 16, 2011 at 10:54, Kfir Lavi lavi.k...@gmail.com wrote:

 Hi,
 I'm creating a router based on Gentoo, that needs to run as a vm using
 qemu.
 The mother machine will be Core I7 4 cores.
 What cpu and CFLAGS should I use to get the best performance out of this
 vm?


 If you intend to run this VM on different hardware or distribute it in any
 way (so you don't really know on what hardware it will run) your best bet is
 to set a generic arch like i686 or lower, OR hope the VM is run on software
 based emulation (slow) so you don't have to worry about what CPU is running
 it.

 From my experience with qemu, you'll have a lot of requirements too, like
 bridging and kernel module for virtual interfaces (tun/tap).

 Now, if this will run on your machine, with kqemu, you'll set march on your
 guest  as your host is...

 --
 Daniel da Veiga


I'll build each router for its box. I don't want to use i686 as I'll run
also on Atom, and this comp is really really slow with kvm support.

Kfir


[gentoo-user] Re: Problem with xf86-video-ati nvidia-drivers

2011-07-17 Thread Nikos Chantziaras

On 07/17/2011 07:22 PM, Grant wrote:

I gave it a try but there was no change.  I tried plugging the TV and
computer into a power strip and also into an isolation transformer.
Any other ideas?


I still think it's a driver problem.  Again: it's *physically* impossible to
have these problems with the HDMI signal.  At most you get digital noise,
which means some pixels get stuck or are missing.  But not what you get;
that's just something that can't be explained.


I was thinking about this.  The digital HDMI signal must be converted
into an analog signal at some point if it's being represented as light
on a TV screen.  Electrical interference generated by the computer and
traveling up the HDMI wire should have its chance to affect things
(i.e. create weird shadows) at that point, right?


Not with DFPs.  Those work digital even internally.  I assume of course 
that his HDMI TV *is* a DFP.





Re: [gentoo-user] Re: Problem with xf86-video-ati nvidia-drivers

2011-07-17 Thread Grant
 I gave it a try but there was no change.  I tried plugging the TV and
 computer into a power strip and also into an isolation transformer.
 Any other ideas?

 I still think it's a driver problem.  Again: it's *physically* impossible
 to
 have these problems with the HDMI signal.  At most you get digital
 noise,
 which means some pixels get stuck or are missing.  But not what you get;
 that's just something that can't be explained.

 I was thinking about this.  The digital HDMI signal must be converted
 into an analog signal at some point if it's being represented as light
 on a TV screen.  Electrical interference generated by the computer and
 traveling up the HDMI wire should have its chance to affect things
 (i.e. create weird shadows) at that point, right?

 Not with DFPs.  Those work digital even internally.  I assume of course that
 his HDMI TV *is* a DFP.

But at some point the 1s and 0s must be converted to some sort of an
analog signal if only right behind the diode.  A diode must be
presented with a signal in some sort of analog form in order to
illuminate, right?  Digital is just a figment of our imagination after
all.

- Grant



[gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Grant
My crontab deletes all files of a certain type in a certain folder
with yesterday's date in the filename.  It usually executes but
sometimes fails with:

/bin/rm: Argument list too long

What would you do about this?

- Grant



Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Alan Mackenzie
Hi, Grant.

On Sun, Jul 17, 2011 at 12:32:42PM -0700, Grant wrote:
 My crontab deletes all files of a certain type in a certain folder
 with yesterday's date in the filename.  It usually executes but
 sometimes fails with:

 /bin/rm: Argument list too long

 What would you do about this?

Use xargs - in place of
/bin/rm lots of files ..

Use
   Lots_of_file_names | xargs rm

.  xargs then calls rm several times with batches of filenames each time.
xargs is a standard Unix command.

 - Grant

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread victor romanchuk
it could be slightly less efficient comparing to plain `rm', but worked around
your problem:

find your-dir -ctime -1 -exec rm {} \;

basically `find' has a lot options filtering result set. these include
time/date, file name  (regexp), file type and so on. consult man for details

victor


Grant wrote, at 07/17/2011 11:32 PM:
 My crontab deletes all files of a certain type in a certain folder
 with yesterday's date in the filename.  It usually executes but
 sometimes fails with:

 /bin/rm: Argument list too long

 What would you do about this?

 - Grant




Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread David W Noon
On Sun, 17 Jul 2011 12:32:42 -0700, Grant wrote about [gentoo-user] Any
way around Argument list too long?:

 My crontab deletes all files of a certain type in a certain folder
 with yesterday's date in the filename.  It usually executes but
 sometimes fails with:
 
 /bin/rm: Argument list too long
 
 What would you do about this?

Use find with the -delete option.
-- 
Regards,

Dave  [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwn...@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


signature.asc
Description: PGP signature


RE: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Pandu Poluan
-original message-
Subject: Re: [gentoo-user] Any way around Argument list too long?
From: Alan Mackenzie a...@muc.de
Date: 2011-07-18 02:42

Hi, Grant.

On Sun, Jul 17, 2011 at 12:32:42PM -0700, Grant wrote:
 My crontab deletes all files of a certain type in a certain folder
 with yesterday's date in the filename.  It usually executes but
 sometimes fails with:

 /bin/rm: Argument list too long

 What would you do about this?

Use xargs - in place of
/bin/rm lots of files ..

Use
   Lots_of_file_names | xargs rm

.  xargs then calls rm several times with batches of filenames each time.
xargs is a standard Unix command.

You'll want to be extra careful with special characters like (space), single 
quote, and double quote.

Better use find . -exec rm {} +

See: http://en.m.wikipedia.org/wiki/Xargs


Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~

Sent from Nokia E72-1





[gentoo-user] Re: Anyone got any older Portage snapshots kicking around?

2011-07-17 Thread James
Stroller stroller at stellar.eclipse.co.uk writes:


 Hope this makes sense. Not a criticism of you, and 
 thanks for trying to be helpful.

Stroller, 

I do not even own a PS3. If firmware can be replaced, then
I see no ethical issue in replacing the firmware; after all
it's your hardware and I assume you did not sign a document
saying that you would not upgrade the firmware.


Pirating and such are not my venue either. Staying in Sony's
good graces so as to stay active on their network, is
a personal decision, and I respect that you know what you
want. Furthermore, if you like those vendor provided games
and services, then paying for them is an excellent way
to ensure that software development market maintains
top programming talent and aggressive competition; healthy
no matter how the dollars are sliced up.


Running linux/gentoo on as many different hardware platforms,
as possible, for me, is a kick in the pants every time
So  I'm a strong advocate that all hardware should be allowed
to be customized (via linux etc), as the current owner desires.
This extends the life of hardware and provides an excellent learning
opportunity us all.


enjoy!

James








Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Alan McKinnon
Are you using wildcards in the arguments to rm ?

Rather use find | xargs or find -exec which are designed to deal with
exactly this circumstance.

On 17 Jul 2011 9:32 PM, Grant emailgr...@gmail.com wrote:

My crontab deletes all files of a certain type in a certain folder
with yesterday's date in the filename.  It usually executes but
sometimes fails with:

/bin/rm: Argument list too long

What would you do about this?

- Grant


[gentoo-user] Decrapifying my system

2011-07-17 Thread Michael Sullivan
I'm running into space issues (my / partition is at 99% of capacity) and
I'd like some advice on what I can remove and how.  My USE line in
/etc/make.conf looks like this:

USE=-setup declarative static-libs gallium moonlight semantic-desktop
-kdeprefix -aqua policykit cdda vhosts automount flashblock jadetex
vanilla additions mplayer -evo gentoo a52  -asterisk dbus ctype session
zaptel ivtv -kerberos gphoto2 pcre mode-owner -firefox seamonkey
-mozilla candy apache2 oss -apm alsa arts avi berkdb bitmap-fonts cdr
crypt cups doc encode fortran f77 foomaticdb gdbm gif gpm -gnome
gstreamer -gtk -gtk2 imlib jpeg -kde libg++ libwww mad mikmod motif mpeg
ncurses nls oggvorbis pam pdf lib png ppds python -qt quicktime readline
-samba sasl sdl threads nntp spell ssl svga tcltk tcpd truetype usb X
xml xml2 xmms xv zlib x86 imap offensive java mysql examples mmx mmx2
perl divx4linux real mmxext audiofile nas snmp hal unicode guile slp
tidy dvd dvdr dvdread flash glut new-login browserplugin nsplugin bzip2
win32codecs v4l v4l2 ruby sql lirc mythtv dvb ffmpeg userlocales php
-debug jack jack-tempfs portaudio bash-completion bind-mysql joystick
cli cgi ftp dba nptl nptlonly libclamav syslog jikes mpm-leader ithreads
-nautilus tcl expat

and I'd like to completely remove both gnome and kde (except for kpat).
 I use xfce, so that shouldn't be a problem, right?  I've tried emerge
-C gnome and emerge -C kde, but the gnome line only unmerged the final
gnome package, and the kde line didn't work at all (I'm thinking it's
called kde-meta now), but unmerging kde-meta only unmerged the final kde
package.  How do I do this?



Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread James Wall
On Sun, Jul 17, 2011 at 4:19 PM, Michael Sullivan msulli1...@gmail.com wrote:
 I'm running into space issues (my / partition is at 99% of capacity) and
 I'd like some advice on what I can remove and how.  My USE line in
 /etc/make.conf looks like this:

 USE=-setup declarative static-libs gallium moonlight semantic-desktop
 -kdeprefix -aqua policykit cdda vhosts automount flashblock jadetex
 vanilla additions mplayer -evo gentoo a52  -asterisk dbus ctype session
 zaptel ivtv -kerberos gphoto2 pcre mode-owner -firefox seamonkey
 -mozilla candy apache2 oss -apm alsa arts avi berkdb bitmap-fonts cdr
 crypt cups doc encode fortran f77 foomaticdb gdbm gif gpm -gnome
 gstreamer -gtk -gtk2 imlib jpeg -kde libg++ libwww mad mikmod motif mpeg
 ncurses nls oggvorbis pam pdf lib png ppds python -qt quicktime readline
 -samba sasl sdl threads nntp spell ssl svga tcltk tcpd truetype usb X
 xml xml2 xmms xv zlib x86 imap offensive java mysql examples mmx mmx2
 perl divx4linux real mmxext audiofile nas snmp hal unicode guile slp
 tidy dvd dvdr dvdread flash glut new-login browserplugin nsplugin bzip2
 win32codecs v4l v4l2 ruby sql lirc mythtv dvb ffmpeg userlocales php
 -debug jack jack-tempfs portaudio bash-completion bind-mysql joystick
 cli cgi ftp dba nptl nptlonly libclamav syslog jikes mpm-leader ithreads
 -nautilus tcl expat

 and I'd like to completely remove both gnome and kde (except for kpat).
  I use xfce, so that shouldn't be a problem, right?  I've tried emerge
 -C gnome and emerge -C kde, but the gnome line only unmerged the final
 gnome package, and the kde line didn't work at all (I'm thinking it's
 called kde-meta now), but unmerging kde-meta only unmerged the final kde
 package.  How do I do this?



I would recommend using emerge -p --depclean to see what can be yanked
off automatically. since you have the gnome and kde-meta packages
already uninstalled it should pull all the chunks out for you.

-- 
No trees were harmed in the sending of this message. However, a large
number of electrons were terribly inconvenienced.



Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Michael Mol
On Sun, Jul 17, 2011 at 3:54 PM, Pandu Poluan pa...@poluan.info wrote:
 -original message-
 Subject: Re: [gentoo-user] Any way around Argument list too long?
 From: Alan Mackenzie a...@muc.de
 Date: 2011-07-18 02:42

Hi, Grant.

On Sun, Jul 17, 2011 at 12:32:42PM -0700, Grant wrote:
 My crontab deletes all files of a certain type in a certain folder
 with yesterday's date in the filename.  It usually executes but
 sometimes fails with:

 /bin/rm: Argument list too long

 What would you do about this?

Use xargs - in place of
    /bin/rm lots of files ..

Use
   Lots_of_file_names | xargs rm

.  xargs then calls rm several times with batches of filenames each time.
xargs is a standard Unix command.

 You'll want to be extra careful with special characters like (space), single 
 quote, and double quote.

 Better use find . -exec rm {} +


This is why I use 'find' with the -print0 parameter.

find (path) (filespec) -print0|xargs -0 command

-- 
:wq



Re: [gentoo-user] Re: Problem with xf86-video-ati nvidia-drivers

2011-07-17 Thread Michael Mol
On Sun, Jul 17, 2011 at 12:54 PM, Grant emailgr...@gmail.com wrote:
 I was thinking about this.  The digital HDMI signal must be converted
 into an analog signal at some point if it's being represented as light
 on a TV screen.  Electrical interference generated by the computer and
 traveling up the HDMI wire should have its chance to affect things
 (i.e. create weird shadows) at that point, right?

 Not with DFPs.  Those work digital even internally.  I assume of course that
 his HDMI TV *is* a DFP.

 But at some point the 1s and 0s must be converted to some sort of an
 analog signal if only right behind the diode.  A diode must be
 presented with a signal in some sort of analog form in order to
 illuminate, right?  Digital is just a figment of our imagination after
 all.

Sure, but that couldn't introduce ghosting as shown in the picture.
Ghosting represents the image being offset in its intended raster
coordinates. By the time a diode is turned on or off, the decision if
which diode a signal goes to has already been made.

-- 
:wq



[gentoo-user] Re: Any way around Argument list too long?

2011-07-17 Thread walt
On 07/17/2011 02:14 PM, Alan McKinnon wrote:
 Are you using wildcards in the arguments to rm ?
 
 Rather use find | xargs or find -exec which are designed to deal with
 exactly this circumstance.
 
 On 17 Jul 2011 9:32 PM, Grant emailgr...@gmail.com
 mailto:emailgr...@gmail.com wrote:
 
 My crontab deletes all files of a certain type in a certain folder

Okay, everyone, back away slowly from this post and then delete it
from your cache.  The *real* Alan McKinnon does not top post.




Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread Michael Sullivan
I don't know much about what each USE flag below actually does.  All of
them have been recommended to me by various elog messages and failed
attempts at emerge.  I'm trying to put all the flags emerge recommends
for a particular package in /etc/portage/package.use now.  Can any of
the below flags be changed to decrease the size of my system?

On 07/17/11 16:28, James Wall wrote:
 On Sun, Jul 17, 2011 at 4:19 PM, Michael Sullivan msulli1...@gmail.com 
 wrote:
 I'm running into space issues (my / partition is at 99% of capacity) and
 I'd like some advice on what I can remove and how.  My USE line in
 /etc/make.conf looks like this:

 USE=-setup declarative static-libs gallium moonlight semantic-desktop
 -kdeprefix -aqua policykit cdda vhosts automount flashblock jadetex
 vanilla additions mplayer -evo gentoo a52  -asterisk dbus ctype session
 zaptel ivtv -kerberos gphoto2 pcre mode-owner -firefox seamonkey
 -mozilla candy apache2 oss -apm alsa arts avi berkdb bitmap-fonts cdr
 crypt cups doc encode fortran f77 foomaticdb gdbm gif gpm -gnome
 gstreamer -gtk -gtk2 imlib jpeg -kde libg++ libwww mad mikmod motif mpeg
 ncurses nls oggvorbis pam pdf lib png ppds python -qt quicktime readline
 -samba sasl sdl threads nntp spell ssl svga tcltk tcpd truetype usb X
 xml xml2 xmms xv zlib x86 imap offensive java mysql examples mmx mmx2
 perl divx4linux real mmxext audiofile nas snmp hal unicode guile slp
 tidy dvd dvdr dvdread flash glut new-login browserplugin nsplugin bzip2
 win32codecs v4l v4l2 ruby sql lirc mythtv dvb ffmpeg userlocales php
 -debug jack jack-tempfs portaudio bash-completion bind-mysql joystick
 cli cgi ftp dba nptl nptlonly libclamav syslog jikes mpm-leader ithreads
 -nautilus tcl expat

 and I'd like to completely remove both gnome and kde (except for kpat).
  I use xfce, so that shouldn't be a problem, right?  I've tried emerge
 -C gnome and emerge -C kde, but the gnome line only unmerged the final
 gnome package, and the kde line didn't work at all (I'm thinking it's
 called kde-meta now), but unmerging kde-meta only unmerged the final kde
 package.  How do I do this?


 
 I would recommend using emerge -p --depclean to see what can be yanked
 off automatically. since you have the gnome and kde-meta packages
 already uninstalled it should pull all the chunks out for you.
 




[gentoo-user] Re: Decrapifying my system

2011-07-17 Thread walt
On 07/17/2011 02:28 PM, James Wall wrote:
 On Sun, Jul 17, 2011 at 4:19 PM, Michael Sullivan msulli1...@gmail.com 
 wrote:
 I'm running into space issues (my / partition is at 99% of capacity) and
 I'd like some advice on what I can remove and how.  My USE line in
 /etc/make.conf looks like this:

 USE=-setup declarative static-libs gallium moonlight semantic-desktop
 -kdeprefix -aqua policykit cdda vhosts automount flashblock jadetex
 vanilla additions mplayer -evo gentoo a52  -asterisk dbus ctype session
 zaptel ivtv -kerberos gphoto2 pcre mode-owner -firefox seamonkey
 -mozilla candy apache2 oss -apm alsa arts avi berkdb bitmap-fonts cdr
 crypt cups doc encode fortran f77 foomaticdb gdbm gif gpm -gnome
 gstreamer -gtk -gtk2 imlib jpeg -kde libg++ libwww mad mikmod motif mpeg
 ncurses nls oggvorbis pam pdf lib png ppds python -qt quicktime readline
 -samba sasl sdl threads nntp spell ssl svga tcltk tcpd truetype usb X
 xml xml2 xmms xv zlib x86 imap offensive java mysql examples mmx mmx2
 perl divx4linux real mmxext audiofile nas snmp hal unicode guile slp
 tidy dvd dvdr dvdread flash glut new-login browserplugin nsplugin bzip2
 win32codecs v4l v4l2 ruby sql lirc mythtv dvb ffmpeg userlocales php
 -debug jack jack-tempfs portaudio bash-completion bind-mysql joystick
 cli cgi ftp dba nptl nptlonly libclamav syslog jikes mpm-leader ithreads
 -nautilus tcl expat

 and I'd like to completely remove both gnome and kde (except for kpat).
  I use xfce, so that shouldn't be a problem, right?  I've tried emerge
 -C gnome and emerge -C kde, but the gnome line only unmerged the final
 gnome package, and the kde line didn't work at all (I'm thinking it's
 called kde-meta now), but unmerging kde-meta only unmerged the final kde
 package.  How do I do this?


 
 I would recommend using emerge -p --depclean to see what can be yanked
 off automatically. since you have the gnome and kde-meta packages
 already uninstalled it should pull all the chunks out for you.

I also use eclean-dist -d every week or two to delete the obsolete source
tarballs from /usr/portage/distfiles.  Sometimes I free up a huge amount of
disk space that way.





Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread Neil Bothwick
On Sun, 17 Jul 2011 16:19:14 -0500, Michael Sullivan wrote:

 I'm running into space issues (my / partition is at 99% of capacity) and
 I'd like some advice on what I can remove and how.

It's impossible to answer that without knowing what is on /. Is /var
on /? If so do you use logrotate, or is /var/lib/mysql full of .bin files?

Without knowing what is taking up the space, you can't know what needs to
be removed. The first step could be

mount --bind / /mnt/tmp
du -ch /mnt/tmp/*


-- 
Neil Bothwick

And what else floats.?


signature.asc
Description: PGP signature


Re: [gentoo-user] Re: Decrapifying my system

2011-07-17 Thread Michael Sullivan
My /usr/portage is shared via NFS from another machine on the network,
so space there isn't really a problem.  Yet.  Anyway, I did an eclean
distfiles a couple of days ago, along with an eclean packages for all
three machines on the network...

On 07/17/11 17:14, walt wrote:
 On 07/17/2011 02:28 PM, James Wall wrote:
 On Sun, Jul 17, 2011 at 4:19 PM, Michael Sullivan msulli1...@gmail.com 
 wrote:
 I'm running into space issues (my / partition is at 99% of capacity) and
 I'd like some advice on what I can remove and how.  My USE line in
 /etc/make.conf looks like this:

 USE=-setup declarative static-libs gallium moonlight semantic-desktop
 -kdeprefix -aqua policykit cdda vhosts automount flashblock jadetex
 vanilla additions mplayer -evo gentoo a52  -asterisk dbus ctype session
 zaptel ivtv -kerberos gphoto2 pcre mode-owner -firefox seamonkey
 -mozilla candy apache2 oss -apm alsa arts avi berkdb bitmap-fonts cdr
 crypt cups doc encode fortran f77 foomaticdb gdbm gif gpm -gnome
 gstreamer -gtk -gtk2 imlib jpeg -kde libg++ libwww mad mikmod motif mpeg
 ncurses nls oggvorbis pam pdf lib png ppds python -qt quicktime readline
 -samba sasl sdl threads nntp spell ssl svga tcltk tcpd truetype usb X
 xml xml2 xmms xv zlib x86 imap offensive java mysql examples mmx mmx2
 perl divx4linux real mmxext audiofile nas snmp hal unicode guile slp
 tidy dvd dvdr dvdread flash glut new-login browserplugin nsplugin bzip2
 win32codecs v4l v4l2 ruby sql lirc mythtv dvb ffmpeg userlocales php
 -debug jack jack-tempfs portaudio bash-completion bind-mysql joystick
 cli cgi ftp dba nptl nptlonly libclamav syslog jikes mpm-leader ithreads
 -nautilus tcl expat

 and I'd like to completely remove both gnome and kde (except for kpat).
  I use xfce, so that shouldn't be a problem, right?  I've tried emerge
 -C gnome and emerge -C kde, but the gnome line only unmerged the final
 gnome package, and the kde line didn't work at all (I'm thinking it's
 called kde-meta now), but unmerging kde-meta only unmerged the final kde
 package.  How do I do this?



 I would recommend using emerge -p --depclean to see what can be yanked
 off automatically. since you have the gnome and kde-meta packages
 already uninstalled it should pull all the chunks out for you.
 
 I also use eclean-dist -d every week or two to delete the obsolete source
 tarballs from /usr/portage/distfiles.  Sometimes I free up a huge amount of
 disk space that way.
 
 
 




Re: [gentoo-user] Re: Any way around Argument list too long?

2011-07-17 Thread Mick
On Sunday 17 Jul 2011 23:06:32 walt wrote:
 On 07/17/2011 02:14 PM, Alan McKinnon wrote:
  Are you using wildcards in the arguments to rm ?
  
  Rather use find | xargs or find -exec which are designed to deal with
  exactly this circumstance.
  
  On 17 Jul 2011 9:32 PM, Grant emailgr...@gmail.com
  mailto:emailgr...@gmail.com wrote:
  
  My crontab deletes all files of a certain type in a certain folder
 
 Okay, everyone, back away slowly from this post and then delete it
 from your cache.  The *real* Alan McKinnon does not top post.

Ha, ha!  Nor does he use HTML formatting in his messages!  o_O

Hmm ... New smartphone or something similar which he hadn't time to hack yet?
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: Any way around Argument list too long?

2011-07-17 Thread Alan McKinnon
On Sunday 17 July 2011 15:06:32 walt did opine thusly:
 On 07/17/2011 02:14 PM, Alan McKinnon wrote:
  Are you using wildcards in the arguments to rm ?
  
  Rather use find | xargs or find -exec which are designed to deal
  with exactly this circumstance.
  
  On 17 Jul 2011 9:32 PM, Grant emailgr...@gmail.com
  mailto:emailgr...@gmail.com wrote:
  
  My crontab deletes all files of a certain type in a certain
  folder
 
 Okay, everyone, back away slowly from this post and then delete it
 from your cache.  The *real* Alan McKinnon does not top post.

He does when his ADSL modem craps out and he's forced to use the GMail 
app thingamajigy on his Android phone :-)

Note to self: Put K-9 Mail back on phone for just in case moments like 
this.



-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread Michael Sullivan
I don't understand how to use logrotate, but I'm pretty sure cron runs
it.  /var/lib/mysql was using 21G, so I think I can go in there (or at
least into the mysql client) and delete the databases that I myself have
created and am no longer using.  If I understood the command you
recommended it mounts / on /mnt/tmp and then du's it.  That's still
running, but isn't that the entire system?

On 07/17/11 17:17, Neil Bothwick wrote:
 On Sun, 17 Jul 2011 16:19:14 -0500, Michael Sullivan wrote:
 
 I'm running into space issues (my / partition is at 99% of capacity) and
 I'd like some advice on what I can remove and how.
 
 It's impossible to answer that without knowing what is on /. Is /var
 on /? If so do you use logrotate, or is /var/lib/mysql full of .bin files?
 
 Without knowing what is taking up the space, you can't know what needs to
 be removed. The first step could be
 
 mount --bind / /mnt/tmp
 du -ch /mnt/tmp/*
 
 




Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread Michael Sullivan
What should I do about the *-bin files in /var/lib/mysql?  I've dropped
the databases I've created and don't need anymore, but there's still a
lot of files in there, and it's still 21G.  There are several files
there dated 2008 that are also on another computer.  How do I safely
remove them?


On 07/17/11 17:17, Neil Bothwick wrote:
 On Sun, 17 Jul 2011 16:19:14 -0500, Michael Sullivan wrote:
 
 I'm running into space issues (my / partition is at 99% of capacity) and
 I'd like some advice on what I can remove and how.
 
 It's impossible to answer that without knowing what is on /. Is /var
 on /? If so do you use logrotate, or is /var/lib/mysql full of .bin files?
 
 Without knowing what is taking up the space, you can't know what needs to
 be removed. The first step could be
 
 mount --bind / /mnt/tmp
 du -ch /mnt/tmp/*
 
 




Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread kashani

On 7/17/2011 2:19 PM, Michael Sullivan wrote:

I'm running into space issues (my / partition is at 99% of capacity) and
I'd like some advice on what I can remove and how.


	Assuming your / partition isn't tiny I've never seen removing packages 
or changing use flags make enough of a difference though there are a 
couple of exceptions. Chances are you've got old data rather than 
binaries somewhere that's causing the space problem.


/usr/src/linux-*
	Each new revisions of the kernel that you install drops a 
/usr/src/linux-$version directory. These are pretty good size and you 
should remove the packages of any kernels you not using. You may also 
need to manually remove the dirs as well after the packages have been 
removed.


/var/lib/mysql
	It's usually not the databases that use space on a home system, but the 
binary logs. Add these two lines under the mysqld portion of your 
/etc/mysql/my.cnf and restart Mysql. You may need to purge bin logs as 
well though Mysql should clean things up when you restart it.


[mysqld]
expire_logs_days = 10
max_binlog_size = 100M

/root/ /tmp/ /
	Lot's of people have the bad habit of leaving dumps, tars or other 
files in these dirs. Check them out.


Lastly a df -h and a sudo du -m --max-depth=1 / would go a long way 
towards pointing to where the problems are.


kashani



Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread Neil Bothwick
On Sun, 17 Jul 2011 17:48:28 -0500, Michael Sullivan wrote:

 What should I do about the *-bin files in /var/lib/mysql?  I've dropped
 the databases I've created and don't need anymore, but there's still a
 lot of files in there, and it's still 21G.  There are several files
 there dated 2008 that are also on another computer.  How do I safely
 remove them?

With rm.


-- 
Neil Bothwick

Assassins do it from behind.


signature.asc
Description: PGP signature


Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread Neil Bothwick
On Sun, 17 Jul 2011 17:34:38 -0500, Michael Sullivan wrote:

Please don't top-post, it makes conversations harder to follow.

 I don't understand how to use logrotate, but I'm pretty sure cron runs
 it. 

You should check that it is enabled and that you have rotated files
in /var/log.

 /var/lib/mysql was using 21G, so I think I can go in there (or at
 least into the mysql client) and delete the databases that I myself have
 created and am no longer using.  If I understood the command you
 recommended it mounts / on /mnt/tmp and then du's it.  That's still
 running, but isn't that the entire system?

No, because other filesystems are mounted against mount points in /, not
in /mnt/tmp. You  mentioned that /usr/portage is mounted via NFS,
so /mnt/tmp/usr/portage should be empty. The bind mount gives a true
indication of what is using the space on that filesystem.


-- 
Neil Bothwick

Everything else being equal, fat people use more soap.


signature.asc
Description: PGP signature


Re: [gentoo-user] Re: Any way around Argument list too long?

2011-07-17 Thread Neil Bothwick
On Mon, 18 Jul 2011 00:35:42 +0200, Alan McKinnon wrote:

  Okay, everyone, back away slowly from this post and then delete it
  from your cache.  The *real* Alan McKinnon does not top post.  
 
 He does when his ADSL modem craps out and he's forced to use the GMail 
 app thingamajigy on his Android phone :-)

I'd rather tether my netbook to my phone and stick with real email :)

I hope your employer has better redundancy that you do ;-)


-- 
Neil Bothwick

Earlier, I didn't have time to finish anything. This time I w


signature.asc
Description: PGP signature


Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread Michael Sullivan
Does this make sense:

camille mysql # du -h
572K./mysql
8.0K./test
239M./mythconverg
128K./vpopmail
152K./myFantasy
120K./pmadb
332K./wikidb
36K ./mysql_cpp_data
592K./forum
124K./movies
84K ./myusers
4.4M./mythconverg.bak
21G .


I'm pretty sure those number don't add up to 21G. So why is it saying
they do???

On 07/17/11 18:11, Neil Bothwick wrote:
 On Sun, 17 Jul 2011 17:48:28 -0500, Michael Sullivan wrote:
 
 What should I do about the *-bin files in /var/lib/mysql?  I've dropped
 the databases I've created and don't need anymore, but there's still a
 lot of files in there, and it's still 21G.  There are several files
 there dated 2008 that are also on another computer.  How do I safely
 remove them?
 
 With rm.
 
 




Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Grant
 way around Argument list too long?:

 My crontab deletes all files of a certain type in a certain folder
 with yesterday's date in the filename.  It usually executes but
 sometimes fails with:

 /bin/rm: Argument list too long

 What would you do about this?

 Use find with the -delete option.

I'm getting the same thing from find:

$ /usr/bin/find /home/user/*-`/bin/date -d 'yesterday' +\%Y\%m\%d`*.jpg
/usr/bin/find: Argument list too long

$ /usr/bin/find -delete /home/user/*-`/bin/date -d 'yesterday' +\%Y\%m\%d`*.jpg
/usr/bin/find: Argument list too long

$ /usr/bin/find /home/user/*-`/bin/date -d 'yesterday' +\%Y\%m\%d`*.jpg|xargs rm
/usr/bin/find: Argument list too long
rm: missing operand
Try `rm --help' for more information.

- Grant



Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread kashani

On 7/17/2011 4:18 PM, Michael Sullivan wrote:

Does this make sense:

camille mysql # du -h
572K./mysql
8.0K./test
239M./mythconverg
128K./vpopmail
152K./myFantasy
120K./pmadb
332K./wikidb
36K ./mysql_cpp_data
592K./forum
124K./movies
84K ./myusers
4.4M./mythconverg.bak
21G .


I'm pretty sure those number don't add up to 21G. So why is it saying
they do???


Because /var/lib/mysql contains 1GB bin log files which aren't in 
/var/lib/mysql/mysql/ or any of the other dirs inside /var/lib/mysql/.


Add these two lines under the mysqld part of your my.cnf and restart 
Mysql. That should take care of the problem and keep bin logs from using 
all your space again.


[mysqld]
expire_logs_days = 10
max_binlog_size = 100M

kashani



Re: [gentoo-user] Re: Problem with xf86-video-ati nvidia-drivers

2011-07-17 Thread Grant
 I was thinking about this.  The digital HDMI signal must be converted
 into an analog signal at some point if it's being represented as light
 on a TV screen.  Electrical interference generated by the computer and
 traveling up the HDMI wire should have its chance to affect things
 (i.e. create weird shadows) at that point, right?

 Not with DFPs.  Those work digital even internally.  I assume of course that
 his HDMI TV *is* a DFP.

 But at some point the 1s and 0s must be converted to some sort of an
 analog signal if only right behind the diode.  A diode must be
 presented with a signal in some sort of analog form in order to
 illuminate, right?  Digital is just a figment of our imagination after
 all.

 Sure, but that couldn't introduce ghosting as shown in the picture.
 Ghosting represents the image being offset in its intended raster
 coordinates. By the time a diode is turned on or off, the decision if
 which diode a signal goes to has already been made.

True, but *is* that D/A conversion made right behind each diode?

- Grant



Re: [gentoo-user] Decrapifying my system

2011-07-17 Thread Alan McKinnon
On Sunday 17 July 2011 18:18:58 Michael Sullivan did opine thusly:
 Does this make sense:
 
 camille mysql # du -h
 572K  ./mysql
 8.0K  ./test
 239M  ./mythconverg
 128K  ./vpopmail
 152K  ./myFantasy
 120K  ./pmadb
 332K  ./wikidb
 36K   ./mysql_cpp_data
 592K  ./forum
 124K  ./movies
 84K   ./myusers
 4.4M  ./mythconverg.bak
 21G   .
 
 
 I'm pretty sure those number don't add up to 21G. So why is it
 saying they do???

You have to understand what du is measuring, and that you are not 
supposed to add the numbers up.

./ is 21G
Then, each individual directory is listed with it's total. The 
difference is the *files* in .

Run ls -al and you'll see a bunch of files there that will add up to 
21G


 
 On 07/17/11 18:11, Neil Bothwick wrote:
  On Sun, 17 Jul 2011 17:48:28 -0500, Michael Sullivan wrote:
  What should I do about the *-bin files in /var/lib/mysql? 
  I've dropped the databases I've created and don't need
  anymore, but there's still a lot of files in there, and it's
  still 21G.  There are several files there dated 2008 that are
  also on another computer.  How do I safely remove them?
  
  With rm.
-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Michael Mol
On Sun, Jul 17, 2011 at 7:23 PM, Grant emailgr...@gmail.com wrote:
 I'm getting the same thing from find:

 $ /usr/bin/find /home/user/*-`/bin/date -d 'yesterday' +\%Y\%m\%d`*.jpg
 /usr/bin/find: Argument list too long

You're using find wrong; the first argument needs to be the root path
it starts searching from. To find files matching a particular name or
pattern, try using -name or -iname.

DATE=$(/bin/date -d 'yesterday' +\%Y\%m\%d)
find /home/user -name '*-$DATE'

-- 
:wq



Re: [gentoo-user] Anyone got any older Portage snapshots kicking around?

2011-07-17 Thread Stroller

On 17 July 2011, at 21:42, James wrote:
 … If firmware can be replaced, then
 I see no ethical issue in replacing the firmware; 

Indeed.

 ... Staying in Sony's
 good graces so as to stay active on their network, is
 a personal decision, and I respect that you know what you
 want.

Yeah, it's this part. For the moment, at least. 

Stroller.





Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Alan McKinnon
On Sunday 17 July 2011 16:23:54 Grant did opine thusly:
  way around Argument list too long?:
  My crontab deletes all files of a certain type in a certain
  folder with yesterday's date in the filename.  It usually
  executes but sometimes fails with:
  
  /bin/rm: Argument list too long
  
  What would you do about this?
  
  Use find with the -delete option.
 
 I'm getting the same thing from find:
 
 $ /usr/bin/find /home/user/*-`/bin/date -d 'yesterday'
 +\%Y\%m\%d`*.jpg /usr/bin/find: Argument list too long
 
 $ /usr/bin/find -delete /home/user/*-`/bin/date -d 'yesterday'
 +\%Y\%m\%d`*.jpg /usr/bin/find: Argument list too long
 
 $ /usr/bin/find /home/user/*-`/bin/date -d 'yesterday'
 +\%Y\%m\%d`*.jpg|xargs rm /usr/bin/find: Argument list too long
 rm: missing operand
 Try `rm --help' for more information.

You are doing it wrong.

Each command has something between ``, so bash is expanding that 
entire list and just before feeding the whole lot to find, realizes 
that the list is longer than 65,536 characters. It's bash that is 
returning that error, not find.

You're mistake is trying to marrow down *where* find should look 
instead of *what* it should look for.

You something like this:

find /home/user -type f -name `/bin/date -d 'yesterday' 
+\%Y\%m\%d`*.jpg`

See the difference? That will not produce a gigantic command line, it 
will produce a rather short one and find will check each file it finds 
one by one and see if it's name matches the supplied pattern.

Word of warning: DO NOT blindly run -delete on this, first check the 
total output and make sure it only has what you want to delete. As 
with all things concerning rm or file deletion, the burden rests on 
you to make completely sure you delete only what you want to delete.


-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] Re: Any way around Argument list too long?

2011-07-17 Thread Alan McKinnon
On Monday 18 July 2011 00:16:40 Neil Bothwick did opine thusly:
 On Mon, 18 Jul 2011 00:35:42 +0200, Alan McKinnon wrote:
   Okay, everyone, back away slowly from this post and then
   delete it from your cache.  The *real* Alan McKinnon does
   not top post.
  
  He does when his ADSL modem craps out and he's forced to use the
  GMail app thingamajigy on his Android phone :-)
 
 I'd rather tether my netbook to my phone and stick with real email
 :)

My old G1 is stuck on Donut :-(
Everything from Eclair onwards just kills the poor thing, and 
tethering never worked reliably.

 I hope your employer has better redundancy that you do ;-)

Of course :-) Everything on the core network is at least duplicated.

As for us plebs at home, our usual backup is the 3G card but between 
one team member crashing a motorbike badly, another (me) crashing a 
motorbike poorly, one off sick with flu, one transferred to another 
team, and everyone at home without petrol (fuel and metal workers 
strike ... please don't ask), none of us remember where the damn card 
is anymore.

The other redundancy is the back up modem, which I have never needed 
to use and now suffers from a bad case of electron-rot. OK, it's 
probably electrolytic caps deteriorated from heat, but electron rot 
sounds much more dramatic ;-)

-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Grant
 You are doing it wrong.

 Each command has something between ``, so bash is expanding that
 entire list and just before feeding the whole lot to find, realizes
 that the list is longer than 65,536 characters. It's bash that is
 returning that error, not find.

 You're mistake is trying to marrow down *where* find should look
 instead of *what* it should look for.

 You something like this:

 find /home/user -type f -name `/bin/date -d 'yesterday'
 +\%Y\%m\%d`*.jpg`

 See the difference? That will not produce a gigantic command line, it
 will produce a rather short one and find will check each file it finds
 one by one and see if it's name matches the supplied pattern.

 Word of warning: DO NOT blindly run -delete on this, first check the
 total output and make sure it only has what you want to delete. As
 with all things concerning rm or file deletion, the burden rests on
 you to make completely sure you delete only what you want to delete.

I ran this and the output was voluminous but looked good:

/usr/bin/find /home/user -type f -name *-`/bin/date -d 'yesterday'
+\%Y\%m\%d`*.jpg

So I ran it again, adding -delete right before -type.  After a lot of
processing I got a line of output like this for each file:

/usr/bin/find: `/home/user/1-2011071612345.jpg': No such file or directory

Unfortunately the command actually deleted the entire /home/user
folder.  Can anyone tell me what went wrong?  Maybe '/home/user' was
at the very top of the long list that scrolled up the screen when I
ran the find command without -delete?

- Grant



Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Albert Hopkins


On Sunday, July 17 at 17:47 (-0700), Grant said:

 ran this and the output was voluminous but looked good:
 
 /usr/bin/find /home/user -type f -name *-`/bin/date -d 'yesterday'
 +\%Y\%m\%d`*.jpg
 
 So I ran it again, adding -delete right before -type.  After a lot of
  

That was a mistake.

 processing I got a line of output like this for each file:
 
 /usr/bin/find: `/home/user/1-2011071612345.jpg': No such file or
 directory
 
 Unfortunately the command actually deleted the entire /home/user
 folder.  Can anyone tell me what went wrong?  Maybe '/home/user' was
 at the very top of the long list that scrolled up the screen when I
 ran the find command without -delete?
 
Well this is an unfortunate way to learn how find works.  A better way
would be:

$ man find

Basically find works of a chain of selection criteria.  It crawls all
the files/dirs and when one item in the chain is true for the criteria,
it checks for the other.  For example

$ find /path -type f -name blah -print

Crawls /path, for each file/dir it checks if it is a regular file (-type
f), if that is true, it checks if it's name is blah, if that is true,
it prints the name (blah).

Therefore, 

$ find /path -delete -type f -name 

Crawls path, then checks -delete.. but wait, -delete evaluates to
true if removal succeeded (find(1)), so it deletes the file, then
checks to see if it is a regular file, then if that is true then it
checks the name... but all that doesn't matter because your files are
deleted.

You should never put -delete at the beginning of a chain and, arguably,
you shouldn't use -delete at all.  It even says in the man page:

Warnings:  Don't  forget that the find command line is evaluated
as an expression, so putting -delete first will make find try to
delete everything below the starting points you specified.  When
testing a find command line that you later intend  to  use  with
-delete,  you should explicitly specify -depth in order to avoid
later surprises.  Because -delete  implies  -depth,  you  cannot
usefully use -prune and -delete together.







Re: [gentoo-user] Any way around Argument list too long?

2011-07-17 Thread Grant
 ran this and the output was voluminous but looked good:

 /usr/bin/find /home/user -type f -name *-`/bin/date -d 'yesterday'
 +\%Y\%m\%d`*.jpg

 So I ran it again, adding -delete right before -type.  After a lot of
  

 That was a mistake.

 processing I got a line of output like this for each file:

 /usr/bin/find: `/home/user/1-2011071612345.jpg': No such file or
 directory

 Unfortunately the command actually deleted the entire /home/user
 folder.  Can anyone tell me what went wrong?  Maybe '/home/user' was
 at the very top of the long list that scrolled up the screen when I
 ran the find command without -delete?

 Well this is an unfortunate way to learn how find works.  A better way
 would be:

 $ man find

 Basically find works of a chain of selection criteria.  It crawls all
 the files/dirs and when one item in the chain is true for the criteria,
 it checks for the other.  For example

 $ find /path -type f -name blah -print

 Crawls /path, for each file/dir it checks if it is a regular file (-type
 f), if that is true, it checks if it's name is blah, if that is true,
 it prints the name (blah).

 Therefore,

 $ find /path -delete -type f -name 

 Crawls path, then checks -delete.. but wait, -delete evaluates to
 true if removal succeeded (find(1)), so it deletes the file, then
 checks to see if it is a regular file, then if that is true then it
 checks the name... but all that doesn't matter because your files are
 deleted.

 You should never put -delete at the beginning of a chain and, arguably,
 you shouldn't use -delete at all.  It even says in the man page:

        Warnings:  Don't  forget that the find command line is evaluated
        as an expression, so putting -delete first will make find try to
        delete everything below the starting points you specified.  When
        testing a find command line that you later intend  to  use  with
        -delete,  you should explicitly specify -depth in order to avoid
        later surprises.  Because -delete  implies  -depth,  you  cannot
        usefully use -prune and -delete together.

Alright, find is tricky.  Is this the right spot for -delete?

/usr/bin/find /home/user -type f -name *-`/bin/date -d 'yesterday'
+\%Y\%m\%d`*.jpg - delete

- Grant



[gentoo-user] {OT} Screen recorder?

2011-07-17 Thread Grant
Does there exist a program that allows you to record the activity
taking place on a computer screen for later review?

- Grant



Re: [gentoo-user] {OT} Screen recorder?

2011-07-17 Thread Stroller

On 18 July 2011, at 02:54, Grant wrote:

 Does there exist a program that allows you to record the activity
 taking place on a computer screen for later review?

I'm pretty sure you can do this with mplayer / mencoder (to make a video 
screencast).

It depends what your needs are, exactly.

If you're monitoring teenagers or employees for inappropriate behaviour you 
might be happy with a screen shot every 1 - 5 minutes, so you could just use 
some kind framebuffer grabber (media-gfx/fbgrab?) and a cronjob. You could 
stitch those together daily into a speeded up video for easier review (you 
might be able to do this with mencoder, just by slowing the capture framerate 
down to once every 60 - 300 seconds) or compile the whole lot into a page of 
HTML to scroll through.

Stroller.




Re: [gentoo-user] {OT} Screen recorder?

2011-07-17 Thread William Kenworthy
On Mon, 2011-07-18 at 03:29 +0100, Stroller wrote:
 On 18 July 2011, at 02:54, Grant wrote:
 
  Does there exist a program that allows you to record the activity
  taking place on a computer screen for later review?
 
 I'm pretty sure you can do this with mplayer / mencoder (to make a video 
 screencast).
 
 It depends what your needs are, exactly.
 
 If you're monitoring teenagers or employees for inappropriate behaviour you 
 might be happy with a screen shot every 1 - 5 minutes, so you could just use 
 some kind framebuffer grabber (media-gfx/fbgrab?) and a cronjob. You could 
 stitch those together daily into a speeded up video for easier review (you 
 might be able to do this with mencoder, just by slowing the capture framerate 
 down to once every 60 - 300 seconds) or compile the whole lot into a page of 
 HTML to scroll through.
 
 Stroller.
 
 

I use this one to prep movies about using software etc ... files are not
as small as camtasias for a given quality, but postprocessing helps get
close if size is important.

BillK


moriah ~ # esearch recordmy
[ Results for search key : recordmy ]
[ Applications found : 3 ]

*  media-video/gtk-recordmydesktop
  Latest version available: 0.3.8-r1
  Latest version installed: [ Not Installed ]
  Size of downloaded files: 172 kB
  Homepage:http://recordmydesktop.sourceforge.net/
  Description: GTK interface for RecordMyDesktop
  License: GPL-2

*  media-video/qt-recordmydesktop
  Latest version available: 0.3.8
  Latest version installed: [ Not Installed ]
  Size of downloaded files: 181 kB
  Homepage:http://recordmydesktop.sourceforge.net/
  Description: QT4 interface for RecordMyDesktop
  License: GPL-2

*  media-video/recordmydesktop
  Latest version available: 0.3.8.1-r4
  Latest version installed: [ Not Installed ]
  Size of downloaded files: 194 kB
  Homepage:http://recordmydesktop.sourceforge.net/
  Description: A desktop session recorder producing Ogg video/audio
files
  License: GPL-2


moriah ~ # 




Re: [gentoo-user] {OT} Screen recorder?

2011-07-17 Thread Mick
On Monday 18 Jul 2011 04:00:31 William Kenworthy wrote:
 On Mon, 2011-07-18 at 03:29 +0100, Stroller wrote:
  On 18 July 2011, at 02:54, Grant wrote:
   Does there exist a program that allows you to record the activity
   taking place on a computer screen for later review?
  
  I'm pretty sure you can do this with mplayer / mencoder (to make a video
  screencast).
  
  It depends what your needs are, exactly.
  
  If you're monitoring teenagers or employees for inappropriate behaviour
  you might be happy with a screen shot every 1 - 5 minutes, so you could
  just use some kind framebuffer grabber (media-gfx/fbgrab?) and a
  cronjob. You could stitch those together daily into a speeded up video
  for easier review (you might be able to do this with mencoder, just by
  slowing the capture framerate down to once every 60 - 300 seconds) or
  compile the whole lot into a page of HTML to scroll through.
  
  Stroller.
 
 I use this one to prep movies about using software etc ... files are not
 as small as camtasias for a given quality, but postprocessing helps get
 close if size is important.
 
 BillK
 
 
 moriah ~ # esearch recordmy
 [ Results for search key : recordmy ]
 [ Applications found : 3 ]
 
 *  media-video/gtk-recordmydesktop
   Latest version available: 0.3.8-r1
   Latest version installed: [ Not Installed ]
   Size of downloaded files: 172 kB
   Homepage:http://recordmydesktop.sourceforge.net/
   Description: GTK interface for RecordMyDesktop
   License: GPL-2
 
 *  media-video/qt-recordmydesktop
   Latest version available: 0.3.8
   Latest version installed: [ Not Installed ]
   Size of downloaded files: 181 kB
   Homepage:http://recordmydesktop.sourceforge.net/
   Description: QT4 interface for RecordMyDesktop
   License: GPL-2
 
 *  media-video/recordmydesktop
   Latest version available: 0.3.8.1-r4
   Latest version installed: [ Not Installed ]
   Size of downloaded files: 194 kB
   Homepage:http://recordmydesktop.sourceforge.net/
   Description: A desktop session recorder producing Ogg video/audio
 files
   License: GPL-2
 
 
 moriah ~ #

Try this:

http://www.gossamer-threads.com/lists/gentoo/user/233511?do=post_view_threaded

or google for ffmpeg for screen cast
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] {OT} Screen recorder?

2011-07-17 Thread Leonardo Guilherme
Useful link
http://verb3k.wordpress.com/2010/01/26/how-to-do-proper-screencasts-on-linux/

Leonardo


2011/7/18 Mick michaelkintz...@gmail.com

 On Monday 18 Jul 2011 04:00:31 William Kenworthy wrote:
  On Mon, 2011-07-18 at 03:29 +0100, Stroller wrote:
   On 18 July 2011, at 02:54, Grant wrote:
Does there exist a program that allows you to record the activity
taking place on a computer screen for later review?
  
   I'm pretty sure you can do this with mplayer / mencoder (to make a
 video
   screencast).
  
   It depends what your needs are, exactly.
  
   If you're monitoring teenagers or employees for inappropriate behaviour
   you might be happy with a screen shot every 1 - 5 minutes, so you could
   just use some kind framebuffer grabber (media-gfx/fbgrab?) and a
   cronjob. You could stitch those together daily into a speeded up video
   for easier review (you might be able to do this with mencoder, just by
   slowing the capture framerate down to once every 60 - 300 seconds) or
   compile the whole lot into a page of HTML to scroll through.
  
   Stroller.
 
  I use this one to prep movies about using software etc ... files are not
  as small as camtasias for a given quality, but postprocessing helps get
  close if size is important.
 
  BillK
 
 
  moriah ~ # esearch recordmy
  [ Results for search key : recordmy ]
  [ Applications found : 3 ]
 
  *  media-video/gtk-recordmydesktop
Latest version available: 0.3.8-r1
Latest version installed: [ Not Installed ]
Size of downloaded files: 172 kB
Homepage:http://recordmydesktop.sourceforge.net/
Description: GTK interface for RecordMyDesktop
License: GPL-2
 
  *  media-video/qt-recordmydesktop
Latest version available: 0.3.8
Latest version installed: [ Not Installed ]
Size of downloaded files: 181 kB
Homepage:http://recordmydesktop.sourceforge.net/
Description: QT4 interface for RecordMyDesktop
License: GPL-2
 
  *  media-video/recordmydesktop
Latest version available: 0.3.8.1-r4
Latest version installed: [ Not Installed ]
Size of downloaded files: 194 kB
Homepage:http://recordmydesktop.sourceforge.net/
Description: A desktop session recorder producing Ogg video/audio
  files
License: GPL-2
 
 
  moriah ~ #

 Try this:


 http://www.gossamer-threads.com/lists/gentoo/user/233511?do=post_view_threaded

 or google for ffmpeg for screen cast
 --
 Regards,
 Mick