[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] 30 chars limit for filenames?



Hi,

On Sun, Aug 26, 2001 at 12:50:50AM +0200, Remi Villatel wrote:
> I put that ton of RPM in one folder and type:
> 
> $ rpm -Uv *

And rpm will never see the '*' but what your shell expands it into!

> What is silly is that "ls" shows all RPM... but it's the only one to see files
> with a name longer than 30 chars. Nothing else works.

Yes, but 'ls *' will show exactly those RPMs that you managed to install.

In fact probably /every/ program except your shell will see all files in
the directory.  But if you use the shell wildcard '*' to pass arguments to
those programs, they will all inherit the problem of your shell.

> TAB completion in bash fails. Using a joker in a filename fails (even with
> "ls"). Only giving a full name as parameter works.

Again: the problem is your shell.  Is it really bash?  Which version?

> And yes, I know, I'm coming with another unbelievable problem...  ;-)

But very easy to solve:

	rpm -Uvh `ls | grep -E '[-_A-Za-z0-9.]+\.rpm$'`

Or (maybe more readable):

	find ./ -name '*.rpm' -print0 | xargs -0 rpm -Uvh

If your find has the same problems as your shell, then you can also do

	find ./ | grep -E '[-_A-Za-z0-9.]+' | xargs rpm -Uvh

:-)

Ciao

Guido

Attachment: pgp55pZ7EnQQu.pgp
Description: PGP signature