🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.os.linux.slackware
4 messages
4 total messages Started by Derek Shaw Mon, 21 Aug 2000 00:00
environment size and "Arg list too long"
#223
Author: Derek Shaw
Date: Mon, 21 Aug 2000 00:00
28 lines
1808 bytes
I recently had an oops on a host, and after getting it working, a previously working 
commnand (chattr), run from cron is now returning "Arg list too long".  From poring thru past postings
with Deja-news, it seems most likely that it is something to do with the environment size.

can anyone tell me where (if) the environment size is set?  Or any other information about this?
BASH_VERSION=1.14.7(1)

I have a kludge working where I use find to process each file, and then execute the chattr command, but I would
much rather use the format:

  chattr +i /var/home/userdir/*

Another clue: if I run the command with a relative path it works fine:
eg:
   cd /
   chattr +i var/home/userdir/*
works, while
   chattr +i /var/home/userdir/*
fails (returns "Arg list too long").

Any clues appreciated!

feel free to respond by e-mail, too (remember to edit the address).
-- 
This is a spam-resistant posting -- replace the he.is with derekshaw to send e-mail.

Derek Shaw
Business Information Systems Victoria, BC.
Re: environment size and "Arg list too long"
#224
Author: Mark Post
Date: Tue, 22 Aug 2000 01:34
19 lines
1492 bytes
On Mon, 21 Aug 2000 23:57:24 GMT, Derek Shaw <he.is@bigfoot.com> wrote:

-snip-
>Another clue: if I run the command with a relative path it works fine:
>eg:
>   cd /
>   chattr +i var/home/userdir/*
>works, while
>   chattr +i /var/home/userdir/*
>fails (returns "Arg list too long").

Derek,

Try chattr +i "/var/home/userdir/*"
using the double-quotes.

Mark Post

To send me email, replace 'nospam' with 'home'.
Re: environment size and "Arg list too long"
#225
Author: Derek Shaw
Date: Tue, 22 Aug 2000 05:47
58 lines
3273 bytes
It would appear that co-incidence is the culprit here.

It seems to be simply the case that /var/home/userdir/* generates too many files for something (either
chattr or the environment) to deal with.

I moved roughly half of the files to another directory, and the command works as before.

There is still the possibility (even likelihood) that I broke something while restoring the functions
of the server, but since I can easily "divide and conquer" in this case, I will do so, and remain alert
to the problem occurring elsewhere or coming back to bite me later.

Feel free to e-mail me if you have any other suggestions.

BTW putting quotes around the absolute path argument simply resulted in the response
  chattr: No such file or directory while stating /var/home/userdir/*

and that really does say "stating".

Cheers!
d.

Derek Shaw wrote:
> 
> I recently had an oops on a host, and after getting it working, a previously working
> commnand (chattr), run from cron is now returning "Arg list too long".  From poring thru past postings
> with Deja-news, it seems most likely that it is something to do with the environment size.
> 
> can anyone tell me where (if) the environment size is set?  Or any other information about this?
> BASH_VERSION=1.14.7(1)
> 
> I have a kludge working where I use find to process each file, and then execute the chattr command, but I would
> much rather use the format:
> 
>   chattr +i /var/home/userdir/*
> 
> Another clue: if I run the command with a relative path it works fine:
> eg:
>    cd /
>    chattr +i var/home/userdir/*
> works, while
>    chattr +i /var/home/userdir/*
> fails (returns "Arg list too long").
> 
> Any clues appreciated!
> 
> feel free to respond by e-mail, too (remember to edit the address).
> --
> This is a spam-resistant posting -- replace the he.is with derekshaw to send e-mail.
> 
> Derek Shaw
> Business Information Systems Victoria, BC.


-- 
This is a spam-resistant posting -- replace the he.is with derekshaw to send e-mail.

Derek Shaw
Business Information Systems Victoria, BC.
Re: environment size and "Arg list too long"
#227
Author: kurt
Date: Wed, 06 Sep 2000 00:41
37 lines
2529 bytes
Derek Shaw wrote:

> I recently had an oops on a host, and after getting it working, a previously working
> commnand (chattr), run from cron is now returning "Arg list too long".  From poring thru past postings
> with Deja-news, it seems most likely that it is something to do with the environment size.
>
> can anyone tell me where (if) the environment size is set?  Or any other information about this?
> BASH_VERSION=1.14.7(1)
>
> I have a kludge working where I use find to process each file, and then execute the chattr command, but I would
> much rather use the format:
>
>   chattr +i /var/home/userdir/*
>
> Another clue: if I run the command with a relative path it works fine:
> eg:
>    cd /
>    chattr +i var/home/userdir/*
> works, while
>    chattr +i /var/home/userdir/*
> fails (returns "Arg list too long").
>
> Any clues appreciated!
>
> feel free to respond by e-mail, too (remember to edit the address).
> --
> This is a spam-resistant posting -- replace the he.is with derekshaw to send e-mail.
>
> Derek Shaw
> Business Information Systems Victoria, BC.

Just a thought, and I'm not sure if I have this correct, but perhaps this is a case for using xargs?
Perhaps a command like the following would work...

find /var/home/userdir /var/home/userdir/*  -prune  -type f| xargs chattr +i

--Kurt
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads