ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Sergei <serpiph@pochtamt.ru>
To: mandrake-russian@altlinux.ru
Subject: Re: [mdk-re] Предельная длинна строки команды?
Date: Thu Sep 13 11:14:01 2001
Message-ID: <200109130723.f8D7NTQ30363@pif.b5.mephi.ru> (raw)
In-Reply-To: <3BA04C9D.769E20D6@zmail.ru>

Четверг 13 Сентябрь 2001 10:05, Вы написали:
> Привет всем!
> Вот только что столкнулся с этим ограничением.
> Есть локальное хранилище Сизифа, пытаюсь сделать chmod на файлы:
>
> [root@back /]# pwd
> /
> [root@back /]# chmod 0644 /smbshare/globus/Upd/Sisyph/RPMS/*
> bash: /bin/chmod: Argument list too long
> получаю ошибку.

Образуется 1 строка вида "/smbshare/globus/Upd/Sisyph/RPMS/1.rpm 
/smbshare/globus/Upd/Sisyph/RPMS/2.rpm ..."


> При этом, если перейти в тот каталог где лежат файлы:
> [root@back /]# cd /smbshare/globus/Upd/Sisyph/RPMS
> [root@back RPMS]# pwd
> /smbshare/globus/Upd/Sisyph/RPMS
> [root@back RPMS]# chmod 0644 *
> [root@back RPMS]#
> ошибки не возникает.

Образуется 1 строка вида "1.rpm 2.rpm ..."

> То есть, подстановка к имени каждого файла имени каталога как раз
> и вызвала превышение предельной длинны строки.

Нет. Сравни, что больше и на сколько.

> Отсюда вопрос:
> А какова у нас в Спринге эта самая предельная длинна? По крайней
> мере для bash.
Самый "простой" способ - залезть в исходники bash :))). На самом деле лезете 
в /usr/include/linux/limits.h.
Там англицким по белому написано:

Длина строки аргументов (128Кб)
#define ARG_MAX       131072	/* # bytes of args + environ for exec() */

#define CHILD_MAX        999    /* no limit :-) */
#define OPEN_MAX         256	/* # open files a process may have */
#define LINK_MAX         127	/* # links a file may have */
#define MAX_CANON        255	/* size of the canonical input queue */
#define MAX_INPUT        255	/* size of the type-ahead buffer */
#define NAME_MAX         255	/* # chars in a file name */

Длина строки пути для команды (4Кб-1)
#define PATH_MAX        4095	/* # chars in a path name */

#define PIPE_BUF        4096	/* # bytes in atomic write to a pipe */

-- 
С уважением, Епифанов Сергей.



  parent reply	other threads:[~2001-09-13 11:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-13 10:01 cornet
2001-09-13 10:37 ` [mdk-re] ðÒÅÄÅÌØÎÁÑ ÄÌÉÎÎÁ ÓÔÒÏËÉ ËÏÍÁÎÄÙ? Russu V.F.
2001-09-13 10:48   ` [mdk-re] Re: [mdk-re] Предельная длинна строки команды? cornet
2001-09-13 11:17     ` [mdk-re] Re: [mdk-re] ðÒÅÄÅÌØÎÁÑ ÄÌÉÎÎÁ ÓÔÒÏËÉ ËÏÍÁÎÄÙ? Russu V.F.
2001-09-13 11:20   ` [mdk-re] Предельная длинна строки команды? Sergei
2001-09-13 11:30     ` [mdk-re] ðÒÅÄÅÌØÎÁÑ ÄÌÉÎÎÁ ÓÔÒÏËÉ ËÏÍÁÎÄÙ? Yuri Ryazantsev
2001-09-13 12:24       ` [mdk-re] Предельная длинна строки команды? Sergei
2001-09-13 11:14 ` Sergei [this message]
2001-09-13 11:42   ` [mdk-re] " cornet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200109130723.f8D7NTQ30363@pif.b5.mephi.ru \
    --to=serpiph@pochtamt.ru \
    --cc=mandrake-russian@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git