From unknown Tue Jun 17 01:44:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#70418: ls bug Resent-From: Toby Kelsey Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 16 Apr 2024 15:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70418 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 70418@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17132801076709 (code B ref -1); Tue, 16 Apr 2024 15:09:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Apr 2024 15:08:27 +0000 Received: from localhost ([127.0.0.1]:44402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwkQ6-0001k5-MC for submit@debbugs.gnu.org; Tue, 16 Apr 2024 11:08:27 -0400 Received: from lists.gnu.org ([2001:470:142::17]:45940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwkQ3-0001ia-9N for submit@debbugs.gnu.org; Tue, 16 Apr 2024 11:08:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwkPl-0001kx-HT for bug-coreutils@gnu.org; Tue, 16 Apr 2024 11:08:05 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwkPj-0006Hs-HU for bug-coreutils@gnu.org; Tue, 16 Apr 2024 11:08:05 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-349a5fa2518so32703f8f.0 for ; Tue, 16 Apr 2024 08:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713280081; x=1713884881; darn=gnu.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=n42mL0/kFxqQSu3mBoCYEWY/AOxQ4q5wznBaCjQQFNQ=; b=DXKBF6Wpdg5M9H/ZktUjWv6kS9fOdd6Wba3uFPoP2GBDELHwhtwj9lchf5w3ZH8NiF 6nJoScXl3+RHIeZbDCiQPBr3oNlPYz9ckbScFinhmG0TNjxDYM3ugT5ay+YEV1KfOvBJ e8PRj2rTpamGVjwo3YUBp3HWyHFNuhH7T85BBbXqqgTRwBKZz1vkhBEwkefeX55Q7li+ RyTrQ2R0zJgEuGNeti2x5SmevJCjD/saW2EMmpipsIlyw4dVf6WWkX4vJDiw5FozURgA /Jrtall1k3UOHZObiJLDlxJk1qDmu0+HfbFUbI3VQW3GwPIGFjf179uxw19KTPcGdEsd j9Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713280081; x=1713884881; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=n42mL0/kFxqQSu3mBoCYEWY/AOxQ4q5wznBaCjQQFNQ=; b=TWR9B/rczlPA5zf2VP7vm4xBZOwCGxl7v0rxCa1Mn90VDLJQ+uPC9BcU6TAGQqvUQH gkquDpYdosre9qelHdtbAr5w9s0Y3Zvx43QZ3EqoqDpP/Asf8kbT4o+5ySEOKBE/xZkj V9OLb0bfptsESSUx+36Rfxj8E8/qmjZoqNpa11lYkEKWjnZe0qyxJxzorUSsHVdl6wMT 2ttlEuMc7dibJXtdJsJkMtDqqyp/3qDYdZQsreKq067IhUeqH1MRdRpBMDVIoFuYslDh NnfVKKcz7e0i3mHtYSmHIWZRehNA3DljW1z+Mm7PpjxZC1kVt+g79U6cGIJ9nIxvrI82 7/xA== X-Gm-Message-State: AOJu0YxFJ+KTIFEOhI7zZKT4SdecCqiFM/PDO//aWxbU83GkgJ11s1bW D3vhDIceDUEhTbxLXSUVd/cwvKbGger9IE3IkixHKgIx44WBKW8Mkadajw== X-Google-Smtp-Source: AGHT+IH7S1ot8yUB8aOGoIC+WDZyXpPZUHJJSdGCU7WEohtPvVWJd+M/du1m7Bab6hKfp/cMdOgv3Q== X-Received: by 2002:a5d:4589:0:b0:33e:c316:2a51 with SMTP id p9-20020a5d4589000000b0033ec3162a51mr7828100wrq.27.1713280081238; Tue, 16 Apr 2024 08:08:01 -0700 (PDT) Received: from [192.168.1.11] (host-78-146-129-111.as13285.net. [78.146.129.111]) by smtp.gmail.com with ESMTPSA id f10-20020a056000128a00b003436a3cae6dsm15112851wrx.98.2024.04.16.08.08.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Apr 2024 08:08:00 -0700 (PDT) Message-ID: <016cc2a1-0759-4ac9-85a3-a9998129e1cc@gmail.com> Date: Tue, 16 Apr 2024 16:07:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Toby Kelsey Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=toby.kelsey@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) 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: -0.0 (/) There appears to be a bug with 'ls' when using the '-f' and '-l' options, or at least an inconsistency with the man page. The man page says '-f' list entries in directory order and does not mention any incompatibilities with other options, however I find using it with the '-l' option gives different ouputs depending on the order of options. See the following script log for an example: toby@toby-pc:/tmp$ mkdir test toby@toby-pc:/tmp$ cd test toby@toby-pc:/tmp/test$ touch c b a foo bar toby@toby-pc:/tmp/test$ ls -lf .  ..  c  b  a  foo  bar toby@toby-pc:/tmp/test$ ls -fl total 0 drwxr-xr-x  2 toby toby 140 Apr 16 15:50 . drwxrwxrwt 18 root root 560 Apr 16 15:50 .. -rw-r--r--  1 toby toby   0 Apr 16 15:50 c -rw-r--r--  1 toby toby   0 Apr 16 15:50 b -rw-r--r--  1 toby toby   0 Apr 16 15:50 a -rw-r--r--  1 toby toby   0 Apr 16 15:50 foo -rw-r--r--  1 toby toby   0 Apr 16 15:50 bar toby@toby-pc:/tmp/test$ ls -l -f .  ..  c  b  a  foo  bar toby@toby-pc:/tmp/test$ ls -f -l total 0 drwxr-xr-x  2 toby toby 140 Apr 16 15:50 . drwxrwxrwt 18 root root 600 Apr 16 15:57 .. -rw-r--r--  1 toby toby   0 Apr 16 15:50 c -rw-r--r--  1 toby toby   0 Apr 16 15:50 b -rw-r--r--  1 toby toby   0 Apr 16 15:50 a -rw-r--r--  1 toby toby   0 Apr 16 15:50 foo -rw-r--r--  1 toby toby   0 Apr 16 15:50 bar toby@toby-pc:/tmp/test$ type ls ls is /usr/bin/ls toby@toby-pc:/tmp/test$ ls --version ls (GNU coreutils) 9.4 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Richard M. Stallman and David MacKenzie. Regards, Toby From unknown Tue Jun 17 01:44:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#70418: ls bug Resent-From: Chris Elvidge Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 16 Apr 2024 15:54:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70418 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Toby Kelsey , 70418@debbugs.gnu.org Received: via spool by 70418-submit@debbugs.gnu.org id=B70418.171328282328172 (code B ref 70418); Tue, 16 Apr 2024 15:54:04 +0000 Received: (at 70418) by debbugs.gnu.org; 16 Apr 2024 15:53:43 +0000 Received: from localhost ([127.0.0.1]:44617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwl7u-0007KI-TG for submit@debbugs.gnu.org; Tue, 16 Apr 2024 11:53:43 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:46439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwl7r-0007K0-7C for 70418@debbugs.gnu.org; Tue, 16 Apr 2024 11:53:41 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-34665dd7744so3153434f8f.1 for <70418@debbugs.gnu.org>; Tue, 16 Apr 2024 08:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713282801; x=1713887601; darn=debbugs.gnu.org; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=fnhrNKSL6oaxVTQsrwcJhDdT+Ce6KgqxjFU6pLWnyMo=; b=inYfbpmO5tePITjfg2JcczfN/PCsGeTj5M7JAIXZBLAxRGVQPebAZsyeWSrmM8t4G7 ixMp34bbn/rx9jPm070J3F5AZ3oZQGefRuy6YqQdE1VgmRJSBaQuxr8XdMfPcKmh3LZ0 9TLOKCjRld2QO89mC3W5R2fdcvcAXvye8n2fpZC2tjCTX+lkH0hXQGtca+gX+hvUgR9O xoswQczKLVx0OKkOQhm1HiXlLuAu7xQyDeuT41V+TLAxJeVVDsyQES8XXes3MzxZiXAB TqDAuthEhRCKcJ2mydbspiGfONVb7xZJALMUqG30WOMJR2/6LJ3r/NGQ1IuFnCZkjlkn Y3zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713282801; x=1713887601; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fnhrNKSL6oaxVTQsrwcJhDdT+Ce6KgqxjFU6pLWnyMo=; b=YyWxFcElBYamkvbaT7HirvA0cL930xNnyIMIh8/UCgIXwCcLfKnqRRp/Flx1xgo7J1 xeiaUL3bJ3PtIg6je0WiO9Ih46O4DOtjw6usWQaPSjlm5FCl3uOFx53btCUYjzD+1ct5 SummACzXePpZ9uCJ2fwtAduq2hH5mpi6Qv4cWaXoIdCceeXqf/ksfFgXfZ76HZlXK70s 52hJaZCF0INB/1IU4wbrO+IGbTYIeDfT6q9WFVUapjjL7ABNJI3zZ2HictyfFjq9TEEW i8DI2p2PNQBS76367k1KcTK7oLHWea3z7V7JMc2hyl+TGnRuul8j8pgsPKHJEgi67vBF KRCA== X-Forwarded-Encrypted: i=1; AJvYcCVh7j+5CCJBUpo+FODMmz3/pdjSNuyHVoVT2gs5Ox2pu9GPcaWmeESimhgJ8MXcVh0XGSoqlZoAfh6FvHKurcv3Hx1UbMg= X-Gm-Message-State: AOJu0YxqkGXtUTx1dBsPUOYjY1n2rb+MAwCOeQlq70kprUMZl5Y8JP19 LHJhsHw/fJH0VOoDOrgLwTtywZ8CyGmGblkEe4yr2Mpgi5HN0olo+s4Lpg== X-Google-Smtp-Source: AGHT+IHhAh4kbXMU/2JmV8lcxym6zQFocrQbiQxbrX+9HhHFYKzw116wtriCQ8/sm3PyfZvO2wRNpQ== X-Received: by 2002:a5d:6685:0:b0:346:8fa3:45cd with SMTP id l5-20020a5d6685000000b003468fa345cdmr8679781wru.41.1713282800478; Tue, 16 Apr 2024 08:53:20 -0700 (PDT) Received: from [192.168.23.101] (92.40.199.220.threembb.co.uk. [92.40.199.220]) by smtp.gmail.com with ESMTPSA id s11-20020a5d69cb000000b00346bf37c97bsm14802808wrw.63.2024.04.16.08.53.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2024 08:53:19 -0700 (PDT) References: <016cc2a1-0759-4ac9-85a3-a9998129e1cc@gmail.com> From: Chris Elvidge Message-ID: Date: Tue, 16 Apr 2024 16:53:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4 MIME-Version: 1.0 In-Reply-To: <016cc2a1-0759-4ac9-85a3-a9998129e1cc@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: 0.8 (/) 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: -0.2 (/) On 16/04/2024 at 16:07, Toby Kelsey wrote: > There appears to be a bug with 'ls' when using the '-f' and '-l' > options, or at least an inconsistency with the man page. The man page > says '-f' list entries in directory order and does not mention any > incompatibilities with other options, however I find using it with the > '-l' option gives different ouputs depending on the order of options. > See the following script log for an example: > > It really says -f = do not sort, enable -aU. -U = do not sort It also says -f = disable -ls --color So -l -f = -f takes precedence, -f -l = -l takes precedence. -- Chris Elvidge From unknown Tue Jun 17 01:44:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#70418: ls bug Resent-From: Toby Kelsey Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 16 Apr 2024 21:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70418 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Chris Elvidge , 70418@debbugs.gnu.org Received: via spool by 70418-submit@debbugs.gnu.org id=B70418.17133030319618 (code B ref 70418); Tue, 16 Apr 2024 21:31:02 +0000 Received: (at 70418) by debbugs.gnu.org; 16 Apr 2024 21:30:31 +0000 Received: from localhost ([127.0.0.1]:45232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwqNp-0002Ur-BG for submit@debbugs.gnu.org; Tue, 16 Apr 2024 17:30:30 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:54585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwqNk-0002TF-US for 70418@debbugs.gnu.org; Tue, 16 Apr 2024 17:30:28 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-346406a5fb9so3803436f8f.1 for <70418@debbugs.gnu.org>; Tue, 16 Apr 2024 14:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713303006; x=1713907806; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=kcdCVnMvh0FP00HVQNuS/mYyYXzAgf4nGlU4c7dSS0c=; b=lDk12lxQ8hLM7Hrbxbb4EJfwGYyzke7bclD4VViiztjNJ9DE9q7f1QwrwQLGD2a7wN lAHizIdNPyOxv8AKzt+fj2L3UNDoiAMWszxKQ8hEVZIw/ukBFX/s/CmjK/jpfRoTJYgx p3HmdMnd4z7kzgp7hPiNbs3VRd6A6o47ZM+4qTjs+M6mgUSpcQemIhIpFIDkVIjnN+hl 6pQzzd9jEpKi1jBSgOUn5Y/v5WAoB+pHJ49euimut66f71Z1pec9N0dVCSbRFRbDcbm+ zj8u/gUf3P79SYfzT3ywS4RURA/UrTONCbFXqA9KYKJ5jpuMkOhwIa0Tq2QeHK34+3vR f2Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713303006; x=1713907806; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kcdCVnMvh0FP00HVQNuS/mYyYXzAgf4nGlU4c7dSS0c=; b=kEb7RKiYFnbONWi7Atc8w5fgcJKomvl0QRF05f/ee8n6CirmYyWI3dcGQDIfdndkcg dlevkJGdAoE8GsQIyvgE30qkuSYcSR1elsHQWKlUvQAbEAp6rbQbQ6b3tg3svBKLYhF8 Pntb4Sjpg8jJw2BtHLcyHwT4FNofnuux6aGHbcQ4u32pRZOwRWC3kBRFRiB7D8EPS40m uXz0DQKyQX9Ozvh++G1298kA2uYOMcbCtvESuh9WUKCV6UDQ72jDQx8zW7micpWkGjUv +WPn7Y3D0/wk1vxoxJ4AtsVkhfFutKgJOxkBIQXpfBuowLmIuPbSNrQdCMBNAwUXp4ZO am9A== X-Forwarded-Encrypted: i=1; AJvYcCXYKpz75ViwA7SlFCpaT4aev79+plyJaFM8AaeQ2ylJb5S3WUeb/UNtwHNaJgPC6EU3G8RqST6CgC9HQxNVK25E9iKrcew= X-Gm-Message-State: AOJu0YzyepgqLnO2LWJ3WR4bpTkocEhovl0AL29ooNwLz5VHojLNu+Mc 9whkY8slimM/Hg6Vq9IlRKhQYt9vS7hpYE1p6IBRyibXLQAZ/JtZBjEwJw== X-Google-Smtp-Source: AGHT+IFv9Dl6WjQN5wK/fdHpRm91TkMipTkIDxZY48dCRbQJWZtjQNNFqzeb91QowpVTlGm1JGMmVg== X-Received: by 2002:adf:efcd:0:b0:346:92d2:a496 with SMTP id i13-20020adfefcd000000b0034692d2a496mr9095072wrp.29.1713303005996; Tue, 16 Apr 2024 14:30:05 -0700 (PDT) Received: from [192.168.1.11] (host-78-146-129-111.as13285.net. [78.146.129.111]) by smtp.gmail.com with ESMTPSA id m1-20020adfe941000000b00343f2cca88dsm15970276wrn.76.2024.04.16.14.30.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Apr 2024 14:30:05 -0700 (PDT) Message-ID: Date: Tue, 16 Apr 2024 22:30:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <016cc2a1-0759-4ac9-85a3-a9998129e1cc@gmail.com> Content-Language: en-US From: Toby Kelsey In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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 (-) The man page doesn't explain this format conflict, while the info page (info '(coreutils) ls invocation' or 'info ls') claims '-f' implies '-1' which is also incorrect: 'ls -1f' gives different output to to 'ls -f'. I am using coreutils 9.4-3 in Manjaro and the online documentation for 9.5 seems to to be only document consistent with actual 9.4 behavior ('-f'  implies '-aU' and disables '-l'), Technically then these are errors in the man and info pages, but I think it is misleading to have what is described as a 'sort option'  determining output format. If the option was described correctly in the man and info documents installed with the software that would be some improvement. Hopefully 9.5 fixes these bugs. Toby On 16/04/2024 16:53, Chris Elvidge wrote: > > > On 16/04/2024 at 16:07, Toby Kelsey wrote: >> There appears to be a bug with 'ls' when using the '-f' and '-l' options, or at least an inconsistency with the man >> page. The man page says '-f' list entries in directory order and does not mention any incompatibilities with other >> options, however I find using it with the '-l' option gives different ouputs depending on the order of options. See >> the following script log for an example: >> >> > It really says -f = do not sort, enable -aU. -U = do not sort > > It also says -f = disable -ls --color > > So -l -f = -f takes precedence, -f -l = -l takes precedence. > From unknown Tue Jun 17 01:44:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#70418: ls bug Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 16 Apr 2024 22:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70418 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Toby Kelsey Cc: Chris Elvidge , 70418@debbugs.gnu.org Received: via spool by 70418-submit@debbugs.gnu.org id=B70418.171330590132024 (code B ref 70418); Tue, 16 Apr 2024 22:19:03 +0000 Received: (at 70418) by debbugs.gnu.org; 16 Apr 2024 22:18:21 +0000 Received: from localhost ([127.0.0.1]:45334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwr86-0008K4-So for submit@debbugs.gnu.org; Tue, 16 Apr 2024 18:18:21 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:50134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwr83-0008Im-V9 for 70418@debbugs.gnu.org; Tue, 16 Apr 2024 18:18:17 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 2C4903C011BD4; Tue, 16 Apr 2024 15:17:57 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id SpUyDP3CeIwK; Tue, 16 Apr 2024 15:17:56 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id A54F33C011BD8; Tue, 16 Apr 2024 15:17:56 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu A54F33C011BD8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1713305876; bh=KTHBQVYvHoZfPx4G5TozvlKM6TVZV/+wkCfJhOqc9jM=; h=Message-ID:Date:MIME-Version:To:From; b=kXndLeDrkBrAciUb520rQP0mVi5uivZk5WhkbwMlpTvTgEZdnY8VYT9HX1fuJE+Kd tZw6KtWXmYq09C/GFocq04iJflp++UcLjKo4G1Jy2MGRQe1I9rSwROF5J7kWhcPRHz fVZ0RXu148Yoyn+SltwLuMJy+JQ43pE42Y7DkZ/rQtfjvrMdmva2M4id8ezl9aRE3b BPE4YUZh/q2YfpjtOtG1I0q1+84QsC/X4Ko9L+UCqnN2DnXTPb0O1RoEq0UBHoA6q5 faX1vP/tG0WbU0+On4WJsqRY9UNy2DQzcFyvMIG3QRmjeUArXA5M4QiJRWqVj4sUUr mZiAwG+GVj4Iw== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id jXGCbHDNI6Ai; Tue, 16 Apr 2024 15:17:56 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 843523C011BD4; Tue, 16 Apr 2024 15:17:56 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------paAhp51D3uipgqk10tyci00i" Message-ID: Date: Tue, 16 Apr 2024 15:17:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <016cc2a1-0759-4ac9-85a3-a9998129e1cc@gmail.com> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: X-Spam-Score: 0.0 (/) 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 (-) This is a multi-part message in MIME format. --------------paAhp51D3uipgqk10tyci00i Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/16/24 14:30, Toby Kelsey wrote: > The man page doesn't explain this format conflict, while the info page > (info '(coreutils) ls invocation' or 'info ls') claims '-f' implies '-1' > which is also incorrect: 'ls -1f' gives different output to to 'ls -f'. Yes, this area of GNU 'ls' a mess. Option order should not matter here. Option order didn't matter in 7th Edition Unix, where -f overrode -l regardless of whether -f came before or after -l. And option order doesn't matter in FreeBSD, where -f and -l are orthogonal. GNU ls is an odd hybrid of 7th Edition and FreeBSD and messes this up. Rather than document the hybrid mess, let's bite the bullet and fix it. FreeBSD behavior makes more sense, so let's do that. Proposed patch attached. --------------paAhp51D3uipgqk10tyci00i Content-Type: text/x-patch; charset=UTF-8; name="0001-ls-f-now-means-a-U.patch" Content-Disposition: attachment; filename="0001-ls-f-now-means-a-U.patch" Content-Transfer-Encoding: base64 RnJvbSA2NzRhNmMyNjJlNTk0MTAyYjA0ODVjNWRlZDg1NGMxYmU1OTAyNzc3IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUdWUsIDE2IEFwciAyMDI0IDE1OjA4OjUxIC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gbHM6IC1mIG5vdyBtZWFucyAtYSAtVQoKUHJvYmxlbSByZXBvcnRlZCBieSBUb2J5IEtl bHNleSA8aHR0cHM6Ly9idWdzLmdudS5vcmcvNzA0MTg+LgoqIHNyYy9scy5jIChkZWNvZGVf c3dpdGNoZXMpOiAtZiBub3cgc2ltcGx5IG1lYW5zIC1hIC1VLgoodXNhZ2UpOiBBZGp1c3Qg dG8gbWF0Y2guCi0tLQogTkVXUyAgICAgICAgICAgICAgIHwgIDcgKysrKysrKwogZG9jL2Nv cmV1dGlscy50ZXhpIHwgMTQgKysrKysrKy0tLS0tLS0KIHNyYy9scy5jICAgICAgICAgICB8 ICA3ICstLS0tLS0KIDMgZmlsZXMgY2hhbmdlZCwgMTUgaW5zZXJ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gcHJpbnRfaHlwZXJsaW5r ID0gZmFsc2U7ICAgICAgLyogZGlzYWJsZSAtLWh5cGVybGluayAqLwotICAgICAgICAgIHBy aW50X2Jsb2NrX3NpemUgPSBmYWxzZTsgICAgIC8qIGRpc2FibGUgLXMgKi8KICAgICAgICAg ICBicmVhazsKIAogICAgICAgICBjYXNlIEZJTEVfVFlQRV9JTkRJQ0FUT1JfT1BUSU9OOiAv KiAtLWZpbGUtdHlwZSAqLwpAQCAtNTQ2Niw3ICs1NDYxLDcgQEAgU29ydCBlbnRyaWVzIGFs cGhhYmV0aWNhbGx5IGlmIG5vbmUgb2YgLWNmdHV2U1VYIG5vciAtLXNvcnQgaXMgc3BlY2lm aWVkLlxuXAogICAtRCwgLS1kaXJlZCAgICAgICAgICAgICAgICBnZW5lcmF0ZSBvdXRwdXQg ZGVzaWduZWQgZm9yIEVtYWNzJyBkaXJlZCBtb2RlXG5cCiAiKSwgc3Rkb3V0KTsKICAgICAg IGZwdXRzIChfKCJcCi0gIC1mICAgICAgICAgICAgICAgICAgICAgICAgIGRvIG5vdCBzb3J0 LCBlbmFibGUgLWFVLCBkaXNhYmxlIC1scyAtLWNvbG9yXG5cCisgIC1mICAgICAgICAgICAg ICAgICAgICAgICAgIHNhbWUgYXMgLWEgLVVcblwKICAgLUYsIC0tY2xhc3NpZnlbPVdIRU5d ICAgICAgYXBwZW5kIGluZGljYXRvciAob25lIG9mICovPT5AfCkgdG8gZW50cmllcyBXSEVO XG5cCiAgICAgICAtLWZpbGUtdHlwZSAgICAgICAgICAgIGxpa2V3aXNlLCBleGNlcHQgZG8g bm90IGFwcGVuZCAnKidcblwKICIpLCBzdGRvdXQpOwotLSAKMi40NC4wCgo= --------------paAhp51D3uipgqk10tyci00i-- From unknown Tue Jun 17 01:44:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#70418: ls bug Resent-From: Chris Elvidge Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 16 Apr 2024 22:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70418 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Paul Eggert , Toby Kelsey Cc: 70418@debbugs.gnu.org Received: via spool by 70418-submit@debbugs.gnu.org id=B70418.171330804416174 (code B ref 70418); Tue, 16 Apr 2024 22:55:02 +0000 Received: (at 70418) by debbugs.gnu.org; 16 Apr 2024 22:54:04 +0000 Received: from localhost ([127.0.0.1]:45364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwrgf-0004CS-TR for submit@debbugs.gnu.org; Tue, 16 Apr 2024 18:54:03 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:46528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwrga-0004AZ-WA for 70418@debbugs.gnu.org; Tue, 16 Apr 2024 18:54:00 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-34665dd7744so3390207f8f.1 for <70418@debbugs.gnu.org>; Tue, 16 Apr 2024 15:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713308018; x=1713912818; darn=debbugs.gnu.org; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=ck1d1X8la3ZEfCLfv+Wm3vFs8s4Rlxx8pbA2bLgYo+c=; b=EiHzxVXlfBrtwHLvKqRTiu6prTL7idCZ2aEtkeZd+Ow0USbXKgpmqVRO8sazl02SOM 3Np6LMqkNxEX3itTesSznX04vAVuG7Pbyr8gYuM+62218SOaeg1F6iFJNhCqL+dnz5T6 0BOOyiDGNU5Pbrt8c19q3lnw5ipKozEn2BrFEIqCzmDNTfsf9X93FhmymJigfmP4OgYm AHNm70lgB1HXkh8MtU0/gyFxqGTp84bAwPFpf1RtHL44iZwI3HouMucU+HJAtAxYHCn0 5+AVYQlDKdnWjjbuJsT+nbUHFxSX7gNqwCKiQXGxN/U/DkGC/cI+gjQ6osd6iWwv/TCV +u+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713308018; x=1713912818; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ck1d1X8la3ZEfCLfv+Wm3vFs8s4Rlxx8pbA2bLgYo+c=; b=KB6iIDLOqYMyvYtANkYzKZ2FFW1pzzfv8bfAzO5YJV2zA9is8sSifwA61UkAvLSAC5 evKehkjK0kHLIg6KcIKJW80xVh5ywkzDxIRtLzJYy+nz/yhpHzLYvMoNUXBduaC9yAe4 Ab4r2BRmqvIgBF8LDK7DVPVMnTBC4dx2taa3yZmwefFBqN8Bhbd3sEdoYpX7q2e1Pvra qX1bGjCxxHmPePClsu7bkpUOrIrwkUC+NBKzSRRHID+J5moFq9OxipqgUa+Hotb+SvFD lBZGYozsyME7C06uUwVrHnltH4SEWvZTWBnPp3U/8cq28y1D513IV/9L9Hz8I8sAfhTu QTaA== X-Gm-Message-State: AOJu0YwaaKyfeHm7rDouBTMezOiHa+8B0K84Sj+yFgMASigLLxlEqPou Nohesm76UXdUWJz1En8mkvf7Jy2oiT8SCo0sbhYWOIVxS6+2+EloGoZ+Gtqv X-Google-Smtp-Source: AGHT+IHn03fFlkjkei78olcb4v6witoyj66zZRlp2VbyomfARyHr3zOieyUxdXRHG6nNo2TexU1v+w== X-Received: by 2002:a5d:5f92:0:b0:346:b95f:278a with SMTP id dr18-20020a5d5f92000000b00346b95f278amr10593670wrb.55.1713308017955; Tue, 16 Apr 2024 15:53:37 -0700 (PDT) Received: from [192.168.23.101] (92.40.204.104.threembb.co.uk. [92.40.204.104]) by smtp.gmail.com with ESMTPSA id h5-20020a5d4305000000b0033e91509224sm15979427wrq.22.2024.04.16.15.53.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2024 15:53:37 -0700 (PDT) References: <016cc2a1-0759-4ac9-85a3-a9998129e1cc@gmail.com> From: Chris Elvidge Message-ID: <92ffd4e1-abc4-d82c-2fd9-238b4422ffe6@gmail.com> Date: Tue, 16 Apr 2024 23:53:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Score: -2.7 (--) 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: -3.7 (---) Thanks for the clarification and patch On 16/04/2024 at 23:17, Paul Eggert wrote: > On 4/16/24 14:30, Toby Kelsey wrote: >> The man page doesn't explain this format conflict, while the info page >> (info '(coreutils) ls invocation' or 'info ls') claims '-f' implies >> '-1' which is also incorrect: 'ls -1f' gives different output to to >> 'ls -f'. > > Yes, this area of GNU 'ls' a mess. Option order should not matter here. > > Option order didn't matter in 7th Edition Unix, where -f overrode -l > regardless of whether -f came before or after -l. And option order > doesn't matter in FreeBSD, where -f and -l are orthogonal. GNU ls is an > odd hybrid of 7th Edition and FreeBSD and messes this up. > > Rather than document the hybrid mess, let's bite the bullet and fix it. > FreeBSD behavior makes more sense, so let's do that. Proposed patch > attached. -- Chris Elvidge From unknown Tue Jun 17 01:44:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#70418: ls bug Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 17 Apr 2024 10:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70418 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Paul Eggert , Toby Kelsey Cc: Chris Elvidge , 70418@debbugs.gnu.org Received: via spool by 70418-submit@debbugs.gnu.org id=B70418.171334919432235 (code B ref 70418); Wed, 17 Apr 2024 10:20:01 +0000 Received: (at 70418) by debbugs.gnu.org; 17 Apr 2024 10:19:54 +0000 Received: from localhost ([127.0.0.1]:45847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx2OP-0008Nr-Pg for submit@debbugs.gnu.org; Wed, 17 Apr 2024 06:19:54 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:46481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rx2OL-0008MP-Jj for 70418@debbugs.gnu.org; Wed, 17 Apr 2024 06:19:52 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-34665dd7744so3691338f8f.1 for <70418@debbugs.gnu.org>; Wed, 17 Apr 2024 03:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713349171; x=1713953971; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=x+kLCOBZPn1svuUAaemeg8AJflf54f7HQV+vKW9PyOk=; b=G6B8I3TGmiqVJhmF+rmxPS1CJ1/e8Bzo2/+WqpqlMs3TpH8nxMWEXMtvvYE/7ReqhY +RMfq42PhQHyBhzHoF/z209ibRjowmwfrjeNrucGJyOBrDqOi68xlC0RQa6lizWr+2gS FryVgckANqXaDMvGbPM8+cHKAtMkJCkxeIIKJmDBdhUSQRSMvjBoNzPoAiEpGe12XeJA CMKsiB4JZWig1VzDMrlg4qMuV0WInp1yqqzBU+5MzlwGtgcNpAkr+OxWZUUcxf/B/4LN HvDQ4g5iXUgZU33qbW+TY4WEnM4jSD3vu+FsQaweRPRYc/ujIPNO7SAH6hw8pO29JOQR VlXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713349171; x=1713953971; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=x+kLCOBZPn1svuUAaemeg8AJflf54f7HQV+vKW9PyOk=; b=n96lQcQEs+Nh1LqH7VuASCi4WpJjYhnZolKf034Q6KXB59MePal6JLTUNnrTwPryQV VlQbJQRz7DEdmjh6VqLMEEMf/K+GgNpGyvztvbzkstqTBVsbjaqQ0zzooLYh2HYtzbqQ SRcQimpTzP75yMygkkiYkPPAnT9HmjldrJzEHQimV7i43Sg5oURWBgtzqpEDHtJ4yo+b jxjv0iuOt9fkQJiBzVkqu8hO2E2K7UlsO790xhGAYfGnFigM+io+e4RAF+M9SUxwWBY4 o7Q4kAbuUDQlZGII8p/by2+woGUtgqU2Quoysr2aBaFojIgZZTdF5ajRhDfzfo5QkZ0L 1N3A== X-Forwarded-Encrypted: i=1; AJvYcCXV7W8Cd2RUMCrbLLtemuG83p7rGA1rQ2r7X+Bzon6ua+4iTqvzZgCerWiHHbX0M4yZjiy1YXu9TgpIG++M+j5XbRnXGl0= X-Gm-Message-State: AOJu0YxgZQ/0VBGMkqziEOkuhZCmRGjvfwczJH2HxgH+svhFvfbnUaMl xpjCzGir6537HBsREoyjPSMFrPyXzIqzN3KDXJWCICqE6NIe8htq X-Google-Smtp-Source: AGHT+IE0LvGxw+V5ycYKDdvD6xGf3+GUzKkAt4nFWF6DTRRO0SovYVFD41urkIAW0N+ocHwlQ+X/LQ== X-Received: by 2002:adf:eb87:0:b0:33e:7aff:a3a0 with SMTP id t7-20020adfeb87000000b0033e7affa3a0mr9644050wrn.71.1713349170816; Wed, 17 Apr 2024 03:19:30 -0700 (PDT) Received: from [192.168.1.53] (86-44-211-146-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.44.211.146]) by smtp.googlemail.com with ESMTPSA id a1-20020a5d5081000000b00349c54d6cefsm1044505wrt.54.2024.04.17.03.19.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Apr 2024 03:19:30 -0700 (PDT) Message-ID: <6e91e43e-60be-262b-076e-c1a81f9e23e5@draigBrady.com> Date: Wed, 17 Apr 2024 11:19:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US References: <016cc2a1-0759-4ac9-85a3-a9998129e1cc@gmail.com> From: =?UTF-8?Q?P=C3=A1draig?= Brady In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.3 (/) 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: -0.7 (/) On 16/04/2024 23:17, Paul Eggert wrote: > On 4/16/24 14:30, Toby Kelsey wrote: >> The man page doesn't explain this format conflict, while the info page >> (info '(coreutils) ls invocation' or 'info ls') claims '-f' implies '-1' >> which is also incorrect: 'ls -1f' gives different output to to 'ls -f'. > > Yes, this area of GNU 'ls' a mess. Option order should not matter here. > > Option order didn't matter in 7th Edition Unix, where -f overrode -l > regardless of whether -f came before or after -l. And option order > doesn't matter in FreeBSD, where -f and -l are orthogonal. GNU ls is an > odd hybrid of 7th Edition and FreeBSD and messes this up. > > Rather than document the hybrid mess, let's bite the bullet and fix it. > FreeBSD behavior makes more sense, so let's do that. Proposed patch > attached. +1 Related to this is the recent adjustment of usage() for -f: https://bugs.gnu.org/67765 Patch looks good, and conforms to POSIX. thanks! Pádraig From unknown Tue Jun 17 01:44:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Toby Kelsey Subject: bug#70418: closed (Re: bug#70418: ls bug) Message-ID: References: <33ed6d6d-7138-400d-ba60-885765aac0e5@cs.ucla.edu> <016cc2a1-0759-4ac9-85a3-a9998129e1cc@gmail.com> X-Gnu-PR-Message: they-closed 70418 X-Gnu-PR-Package: coreutils Reply-To: 70418@debbugs.gnu.org Date: Wed, 17 Apr 2024 21:45:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1713390302-8666-1" This is a multi-part message in MIME format... ------------=_1713390302-8666-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #70418: ls bug which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 70418@debbugs.gnu.org. --=20 70418: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D70418 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1713390302-8666-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 70418-done) by debbugs.gnu.org; 17 Apr 2024 21:44:14 +0000 Received: from localhost ([127.0.0.1]:48368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxD4g-00029Y-Jj for submit@debbugs.gnu.org; Wed, 17 Apr 2024 17:44:14 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:57864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxD4e-00029C-5O for 70418-done@debbugs.gnu.org; Wed, 17 Apr 2024 17:44:13 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id B0DB93C011BDA; Wed, 17 Apr 2024 14:43:52 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id XDaat98Rh28n; Wed, 17 Apr 2024 14:43:52 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 620C13C011BDB; Wed, 17 Apr 2024 14:43:52 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 620C13C011BDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1713390232; bh=rR+rHHD4sTgEd0SbVY+OYo7SvCs6S+H9fkwtA0XqVHs=; h=Message-ID:Date:MIME-Version:To:From; b=WoVn2aHBvqpzPcOXdIhKE0YlTK0nEZvmbbcC/gqy34R00TvQungtovkko5wJE0eR0 ZbnJwVCXB8L0cWIxyy7mW15u8pngJn9c1uhy8FpJJdxCTOYG9qM8bfR3tmLKb2cBlG d9LGu3Z39I0Lbx3IOo2WZJ9JPuAbjvoLe6/1YttQywbo4nvd1EovE971KhJYQMX5cR TlInzYBbmTIn2mkjsHFeIMHhiw55M/GkET+av6ztPZGtzlHGf5+dTHsaFEn2cAZvh9 ARS24PvdUn++fSqiWnByEjiJtbXfWBIqvI/DRY27UofZbgOZKWis9MnULE2/5RYRnE wdMK+Soj8wmFQ== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id Sq8IQE6sTar7; Wed, 17 Apr 2024 14:43:52 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 47F143C011BDA; Wed, 17 Apr 2024 14:43:52 -0700 (PDT) Message-ID: <33ed6d6d-7138-400d-ba60-885765aac0e5@cs.ucla.edu> Date: Wed, 17 Apr 2024 14:43:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#70418: ls bug To: =?UTF-8?Q?P=C3=A1draig_Brady?= , Toby Kelsey References: <016cc2a1-0759-4ac9-85a3-a9998129e1cc@gmail.com> <6e91e43e-60be-262b-076e-c1a81f9e23e5@draigBrady.com> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <6e91e43e-60be-262b-076e-c1a81f9e23e5@draigBrady.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70418-done Cc: Chris Elvidge , 70418-done@debbugs.gnu.org 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 (-) On 4/17/24 03:19, P=C3=A1draig Brady wrote: > Patch looks good, and conforms to POSIX. Thanks for the review. I installed the patch and am closing this bug repo= rt. ------------=_1713390302-8666-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 16 Apr 2024 15:08:27 +0000 Received: from localhost ([127.0.0.1]:44402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwkQ6-0001k5-MC for submit@debbugs.gnu.org; Tue, 16 Apr 2024 11:08:27 -0400 Received: from lists.gnu.org ([2001:470:142::17]:45940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwkQ3-0001ia-9N for submit@debbugs.gnu.org; Tue, 16 Apr 2024 11:08:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwkPl-0001kx-HT for bug-coreutils@gnu.org; Tue, 16 Apr 2024 11:08:05 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwkPj-0006Hs-HU for bug-coreutils@gnu.org; Tue, 16 Apr 2024 11:08:05 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-349a5fa2518so32703f8f.0 for ; Tue, 16 Apr 2024 08:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713280081; x=1713884881; darn=gnu.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=n42mL0/kFxqQSu3mBoCYEWY/AOxQ4q5wznBaCjQQFNQ=; b=DXKBF6Wpdg5M9H/ZktUjWv6kS9fOdd6Wba3uFPoP2GBDELHwhtwj9lchf5w3ZH8NiF 6nJoScXl3+RHIeZbDCiQPBr3oNlPYz9ckbScFinhmG0TNjxDYM3ugT5ay+YEV1KfOvBJ e8PRj2rTpamGVjwo3YUBp3HWyHFNuhH7T85BBbXqqgTRwBKZz1vkhBEwkefeX55Q7li+ RyTrQ2R0zJgEuGNeti2x5SmevJCjD/saW2EMmpipsIlyw4dVf6WWkX4vJDiw5FozURgA /Jrtall1k3UOHZObiJLDlxJk1qDmu0+HfbFUbI3VQW3GwPIGFjf179uxw19KTPcGdEsd j9Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713280081; x=1713884881; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=n42mL0/kFxqQSu3mBoCYEWY/AOxQ4q5wznBaCjQQFNQ=; b=TWR9B/rczlPA5zf2VP7vm4xBZOwCGxl7v0rxCa1Mn90VDLJQ+uPC9BcU6TAGQqvUQH gkquDpYdosre9qelHdtbAr5w9s0Y3Zvx43QZ3EqoqDpP/Asf8kbT4o+5ySEOKBE/xZkj V9OLb0bfptsESSUx+36Rfxj8E8/qmjZoqNpa11lYkEKWjnZe0qyxJxzorUSsHVdl6wMT 2ttlEuMc7dibJXtdJsJkMtDqqyp/3qDYdZQsreKq067IhUeqH1MRdRpBMDVIoFuYslDh NnfVKKcz7e0i3mHtYSmHIWZRehNA3DljW1z+Mm7PpjxZC1kVt+g79U6cGIJ9nIxvrI82 7/xA== X-Gm-Message-State: AOJu0YxFJ+KTIFEOhI7zZKT4SdecCqiFM/PDO//aWxbU83GkgJ11s1bW D3vhDIceDUEhTbxLXSUVd/cwvKbGger9IE3IkixHKgIx44WBKW8Mkadajw== X-Google-Smtp-Source: AGHT+IH7S1ot8yUB8aOGoIC+WDZyXpPZUHJJSdGCU7WEohtPvVWJd+M/du1m7Bab6hKfp/cMdOgv3Q== X-Received: by 2002:a5d:4589:0:b0:33e:c316:2a51 with SMTP id p9-20020a5d4589000000b0033ec3162a51mr7828100wrq.27.1713280081238; Tue, 16 Apr 2024 08:08:01 -0700 (PDT) Received: from [192.168.1.11] (host-78-146-129-111.as13285.net. [78.146.129.111]) by smtp.gmail.com with ESMTPSA id f10-20020a056000128a00b003436a3cae6dsm15112851wrx.98.2024.04.16.08.08.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Apr 2024 08:08:00 -0700 (PDT) Message-ID: <016cc2a1-0759-4ac9-85a3-a9998129e1cc@gmail.com> Date: Tue, 16 Apr 2024 16:07:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: bug-coreutils@gnu.org From: Toby Kelsey Subject: ls bug Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=toby.kelsey@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit 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: -0.0 (/) There appears to be a bug with 'ls' when using the '-f' and '-l' options, or at least an inconsistency with the man page. The man page says '-f' list entries in directory order and does not mention any incompatibilities with other options, however I find using it with the '-l' option gives different ouputs depending on the order of options. See the following script log for an example: toby@toby-pc:/tmp$ mkdir test toby@toby-pc:/tmp$ cd test toby@toby-pc:/tmp/test$ touch c b a foo bar toby@toby-pc:/tmp/test$ ls -lf .  ..  c  b  a  foo  bar toby@toby-pc:/tmp/test$ ls -fl total 0 drwxr-xr-x  2 toby toby 140 Apr 16 15:50 . drwxrwxrwt 18 root root 560 Apr 16 15:50 .. -rw-r--r--  1 toby toby   0 Apr 16 15:50 c -rw-r--r--  1 toby toby   0 Apr 16 15:50 b -rw-r--r--  1 toby toby   0 Apr 16 15:50 a -rw-r--r--  1 toby toby   0 Apr 16 15:50 foo -rw-r--r--  1 toby toby   0 Apr 16 15:50 bar toby@toby-pc:/tmp/test$ ls -l -f .  ..  c  b  a  foo  bar toby@toby-pc:/tmp/test$ ls -f -l total 0 drwxr-xr-x  2 toby toby 140 Apr 16 15:50 . drwxrwxrwt 18 root root 600 Apr 16 15:57 .. -rw-r--r--  1 toby toby   0 Apr 16 15:50 c -rw-r--r--  1 toby toby   0 Apr 16 15:50 b -rw-r--r--  1 toby toby   0 Apr 16 15:50 a -rw-r--r--  1 toby toby   0 Apr 16 15:50 foo -rw-r--r--  1 toby toby   0 Apr 16 15:50 bar toby@toby-pc:/tmp/test$ type ls ls is /usr/bin/ls toby@toby-pc:/tmp/test$ ls --version ls (GNU coreutils) 9.4 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Richard M. Stallman and David MacKenzie. Regards, Toby ------------=_1713390302-8666-1--