🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.os.linux.slackware
Article #227

Re: environment size and "Arg list too long"

#227
From: 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
Technical Details
Message-ID: <39B592C4.57E269C5@nospam.thegrid.net>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!sn-xit-uk!supernews.com!193.162.153.122.MISMATCH!news.tele.dk!144.212.100.101!newsfeed.mathworks.com!europa.netcrusader.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!nntp3.onemain.com.POSTED!not-for-mail
References: <39A1C1E4.A1F33280@bigfoot.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f906c,86ff5b0ae5b4242e
X-Google-Attributes: gidf906c,public
X-Google-Thread: 1054c0,86ff5b0ae5b4242e
X-Google-Attributes: gid1054c0,public
X-Google-ArrivalTime: 2000-09-05 17:59:45 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!sn-xit-uk!supernews.com!193.162.153.122.MISMATCH!news.tele.dk!144.212.100.101!newsfeed.mathworks.com!europa.netcrusader.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!nntp3.onemain.com.POSTED!not-for-mail
Message-ID: <39B592C4.57E269C5@nospam.thegrid.net>
From: kurt <i763748@thegrid.net>
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.14-15mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: alt.os.linux.slackware,gnu.bash
Subject: Re: environment size and "Arg list too long"
References: <39A1C1E4.A1F33280@bigfoot.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 40
Date: Tue, 05 Sep 2000 17:41:40 -0700
NNTP-Posting-Host: 209.162.21.137
X-Complaints-To: abuse@onemain.com
X-Trace: nntp3.onemain.com 968201835 209.162.21.137 (Tue, 05 Sep 2000 20:57:15 EDT)
NNTP-Posting-Date: Tue, 05 Sep 2000 20:57:15 EDT