From unknown Fri Aug 15 15:56:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12551 <12551@debbugs.gnu.org> To: bug#12551 <12551@debbugs.gnu.org> Subject: Status: ls -l Reply-To: bug#12551 <12551@debbugs.gnu.org> Date: Fri, 15 Aug 2025 22:56:13 +0000 retitle 12551 ls -l reassign 12551 coreutils submitter 12551 "Chen,Wei" severity 12551 normal tag 12551 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 01 11:34:17 2012 Received: (at submit) by debbugs.gnu.org; 1 Oct 2012 15:34:17 +0000 Received: from localhost ([127.0.0.1]:36536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIi0e-00026z-8G for submit@debbugs.gnu.org; Mon, 01 Oct 2012 11:34:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58943) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIhCb-0000vq-6F for submit@debbugs.gnu.org; Mon, 01 Oct 2012 10:42:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIhC6-0006LC-8v for submit@debbugs.gnu.org; Mon, 01 Oct 2012 10:42:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:50964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIhC6-0006L8-5X for submit@debbugs.gnu.org; Mon, 01 Oct 2012 10:42:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIhC0-00029D-8P for bug-coreutils@gnu.org; Mon, 01 Oct 2012 10:42:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIhBu-0006J5-GI for bug-coreutils@gnu.org; Mon, 01 Oct 2012 10:41:56 -0400 Received: from mdamdcp02.mdanderson.org ([143.111.3.57]:21597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIhBu-0006Ik-Bv for bug-coreutils@gnu.org; Mon, 01 Oct 2012 10:41:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0CADeraVCPbwM3gWdsb2JhbABFgku8DwEBFiYngictXgEMdCYBBBuHfZhkoSeRCmADiFigQQ Received: from ironportout.mdanderson.org (HELO mail.mdanderson.org) ([143.111.3.55]) by mdamdcp02.mdanderson.org with ESMTP; 01 Oct 2012 09:41:40 -0500 Received: from DCPWVMBXC0VS3.mdanderson.edu ([10.111.112.19]) by DCPWPRTR02.mdanderson.edu ([10.111.50.199]) with mapi; Mon, 1 Oct 2012 09:43:09 -0500 From: "Chen,Wei" To: "bug-coreutils@gnu.org" Date: Mon, 1 Oct 2012 09:41:38 -0500 Subject: ls -l Thread-Topic: ls -l Thread-Index: Ac2f4t03qElMT5zuQ0yKX8k9u6JkPw== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_CD1B8A547ECAA14AAD7FA0A052B5D92E2D26F170ADDCPWVMBXC0VS3_" MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 01 Oct 2012 11:34:15 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) --_000_CD1B8A547ECAA14AAD7FA0A052B5D92E2D26F170ADDCPWVMBXC0VS3_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable When I typed 'ls -l *chr4*' in linux, it gave me this: bash-4.1$ ls -l *chr4* ls: invalid option -- '4' Try `ls --help' for more information. It used to work for me, why? Thanks! Wei --_000_CD1B8A547ECAA14AAD7FA0A052B5D92E2D26F170ADDCPWVMBXC0VS3_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

When I typed = 216;ls –l *chr4*’ in linux, it gave me this:<= /p>

 

bash-4.1$=   ls -l *chr4*

ls: invalid option -= - '4'

Try `ls --help' for more informati= on.

 

It used to work for me, why?

=  

Thanks!

 

Wei

= --_000_CD1B8A547ECAA14AAD7FA0A052B5D92E2D26F170ADDCPWVMBXC0VS3_-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 01 12:49:39 2012 Received: (at 12551) by debbugs.gnu.org; 1 Oct 2012 16:49:40 +0000 Received: from localhost ([127.0.0.1]:36611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIjBa-0004hD-Tt for submit@debbugs.gnu.org; Mon, 01 Oct 2012 12:49:39 -0400 Received: from joseki.proulx.com ([216.17.153.58]:60855) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIjBY-0004h2-M7; Mon, 01 Oct 2012 12:49:37 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id A47AC211D6; Mon, 1 Oct 2012 10:49:08 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 84BE32DC79; Mon, 1 Oct 2012 10:49:08 -0600 (MDT) Date: Mon, 1 Oct 2012 10:49:08 -0600 From: Bob Proulx To: "Chen,Wei" Subject: Re: bug#12551: ls -l Message-ID: <20121001164908.GA14598@hysteria.proulx.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 12551 Cc: 12551@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.3 (-) tag 12551 + moreinfo thanks Chen,Wei wrote: > When I typed 'ls -l *chr4*' in linux, it gave me this: > > bash-4.1$ ls -l *chr4* > ls: invalid option -- '4' > Try `ls --help' for more information. > > It used to work for me, why? You are expanding a file glob "*chr4*" in the current directory. This will be expanded to match any files in the current directory. If any of those files start with a dash character '-' then the string will be interpreted as an option. You can see the problem by using echo to print the file glob. echo ls -l *chr4* To avoid it you will need to force an end of option argument processing or force the string to not start with a dash. ls -l -- *chr4* ls -l ./*chr4* Please see this FAQ and the next two related ones after it too. http://www.gnu.org/software/coreutils/faq/#How-do-I-remove-files-that-start-with-a-dash_003f Bob From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 23 18:07:13 2018 Received: (at 12551) by debbugs.gnu.org; 23 Oct 2018 22:07:13 +0000 Received: from localhost ([127.0.0.1]:38688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gF4pU-000096-Re for submit@debbugs.gnu.org; Tue, 23 Oct 2018 18:07:13 -0400 Received: from mail-io1-f52.google.com ([209.85.166.52]:35885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gF4pT-00008o-0N; Tue, 23 Oct 2018 18:07:11 -0400 Received: by mail-io1-f52.google.com with SMTP id o19-v6so1903998iod.3; Tue, 23 Oct 2018 15:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=UUBaOx9ycBc6U5S4ztdoDZgxv10WRrptApS2YEh1h3U=; b=Xjl2I4TIfwBPF3PzPnmP8CFFMMHJlqk6y/l1njDbDcTJ8dAkk4CQVdSPwyEx1N2hqT GynQfKe5dhU685dvcPIHpWYxYXuD7Bk2cPNfLP1LNwHBrepHPbYNAdbDF0bXrv0cAdKc sgNU8Jm2RX2s3gmfrqsRyjQjr65ces0KLobY+d2XL8jVy7JVHJS0vAD0uIWV+t3G0stz qctE5zdisRZ70jS8imorE1SyWtEbGXyJOh7VJmCG68wqXo7Z0U9yxufa8maBPvtRQpDb yrrZ/dTOUnxd00SjoUVScoFvhmb1+jlpPbE1AQIt02nN2HTW/ULZaWn/WscT6puxfGNM +Z+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UUBaOx9ycBc6U5S4ztdoDZgxv10WRrptApS2YEh1h3U=; b=lgS+yKepppqgWcALKn33QOaHHuR2hnZRN2rgcF9fskR1YbdXMIk7p14apb2HKyzlfP 3++QZm3vLH94caFrHGXSalc4u0RvzYu4NV9FjJrCN7+ZFhMqL/xa02/4MbM/D/1XRDAo urJ0U2Bymgr0ktAqp0hcWaXvUU4pOwzQ+WInSya7I2EY02Nkx5Lc6M5uH38Zm/HnWxNw P1GCgi9XouCxQo2CY6rZS+U/bRlZZLpVuOSFv0iv/hDT7L0CvOzcPTXjEhyGVO7GTcvL 5uD/BumxHt/RrlnB6tp2barBIRO0C+85gcsvOMqWoGh+8lvX3zUCGJJyORj9eeBE2HWy AJlQ== X-Gm-Message-State: AGRZ1gJQcbcyRqhYrzw+TebyRpv7ifULADeWQA9xM9tB7f3JIyw6CIN8 TNHuT5tbkaykEptzQlk2/QcGLcOYO9Y= X-Google-Smtp-Source: AJdET5dvfoPWeXZlCz0uJN1bRFDKupMWtj1IIV8GsUqnemf/3uPybKxv1NjymcG5oxuGJLvh0paoLw== X-Received: by 2002:a6b:f30c:: with SMTP id m12-v6mr2525245ioh.253.1540332425040; Tue, 23 Oct 2018 15:07:05 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id y22-v6sm913569iob.79.2018.10.23.15.07.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 15:07:03 -0700 (PDT) Subject: Re: bug#12551: ls -l To: 12551@debbugs.gnu.org References: <20121001164908.GA14598@hysteria.proulx.com> From: Assaf Gordon Message-ID: <071bb9f9-4c54-1bfe-b2f0-c232e11faa0e@gmail.com> Date: Tue, 23 Oct 2018 16:07:02 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20121001164908.GA14598@hysteria.proulx.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 12551 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 12551 stop (triaging old bugs) On 01/10/12 10:49 AM, Bob Proulx wrote: > > Chen,Wei wrote: >> When I typed 'ls -l *chr4*' in linux, it gave me this: >> >> bash-4.1$ ls -l *chr4* >> ls: invalid option -- '4' >> Try `ls --help' for more information. >> >> It used to work for me, why? > > You are expanding a file glob "*chr4*" in the current directory. This > will be expanded to match any files in the current directory. If any > of those files start with a dash character '-' then the string will be > interpreted as an option. > With no further comments to Bob's explanation, I'm closing this bug. -assaf From unknown Fri Aug 15 15:56:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 21 Nov 2018 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator