[opensuse-factory] Quirk in konsole - Tumbleweed 20200604
I'll get around to filing a bug later. lancelot@slipstream:~/ftp/JUN20> ls *.mp4 ls: invalid option -- '2' Try 'ls --help' for more information. lancelot@slipstream:~/ftp/JUN20> ls Amp Up A QRP Ham Radio With MX-P50M.mp4 -23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4 The New Frontier A Gentle Introduction to Rust - Matthew Gathu.mp4 etc., etc. Same as root if in that directory but OK when given the full path. slipstream:/home/lancelot/ftp/JUN20 # ls *.mp4 ls: invalid option -- '2' Try 'ls --help' for more information. slipstream:/home/lancelot/ftp/JUN20 # ls /home/lancelot/ftp/JUN20/*.mp4 /home/lancelot/ftp/JUN20/-23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4 /home/lancelot/ftp/JUN20/Rust Tutorial Rust Programming Language Tutorial For Beginners Rust Training Edureka.mp4 /home/lancelot/ftp/JUN20/Amp Up A QRP Ham Radio With MX-P50M.mp4 /home/lancelot/ftp/JUN20/The New Frontier A Gentle Introduction to Rust - Matthew Gathu.mp4 /home/lancelot/ftp/JUN20/F5NPV - Quisk - Midi controller and Raspberry PI.mp4 slipstream:/home/lancelot/ftp/JUN20 # Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Senior Staff Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tuesday 2020-06-09 13:31, Sid Boyce wrote:
lancelot@slipstream:~/ftp/JUN20> ls *.mp4 ls: invalid option -- '2'
-23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4
Everything behaves normal. dash introduces an option. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2020-06-09 13:31, Sid Boyce wrote:
I'll get around to filing a bug later.
lancelot@slipstream:~/ftp/JUN20> ls *.mp4 ls: invalid option -- '2' Try 'ls --help' for more information. lancelot@slipstream:~/ftp/JUN20> ls
Amp Up A QRP Ham Radio With MX-P50M.mp4
-23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4
No bug, but expected behavior - similar to: https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#How-do-I-remov... "Since the file name begins with a ’-’ it looks like an option to the command. You need to force it to not look like an option. Put a ./ in front of it. Or give it the full file name path. Or tell the command you are through with options by using the double dash to end all option processing. This is common to most traditional Unix commands." Therefore: ls ./*.mp4 ls /full/path/*.mp4 ls -- *.mp4 Have a nice day, Berny -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 09/06/2020 14:10, Bernhard Voelker wrote:
On 2020-06-09 13:31, Sid Boyce wrote:
I'll get around to filing a bug later.
lancelot@slipstream:~/ftp/JUN20> ls *.mp4 ls: invalid option -- '2' Try 'ls --help' for more information. lancelot@slipstream:~/ftp/JUN20> ls
Amp Up A QRP Ham Radio With MX-P50M.mp4
-23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4 No bug, but expected behavior - similar to:
https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#How-do-I-remov...
"Since the file name begins with a ’-’ it looks like an option to the command. You need to force it to not look like an option. Put a ./ in front of it. Or give it the full file name path. Or tell the command you are through with options by using the double dash to end all option processing. This is common to most traditional Unix commands."
Therefore:
ls ./*.mp4 ls /full/path/*.mp4 ls -- *.mp4
Have a nice day, Berny
Thanks Bernhard, That's the first time I have ever encountered this on Linux, Solaris, UTS or any other Unix. Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Senior Staff Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2020-06-10 01:58, Sid Boyce wrote:
That's the first time I have ever encountered this on Linux, Solaris, UTS or any other Unix.
That's really very old behavior - there was no change for that in the past few decades at least. Once one is fallen in that trap, he/she will ever remember. Just imagine files like "-rf" or "--help". While the former would e.g. let rm(1) remove recursively, the latter could make a command in a script return with exit status 0 although it would/should fail. Thorough quoting/escaping arguments is key. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/06/2020 01:46, Bernhard Voelker wrote:
On 2020-06-10 01:58, Sid Boyce wrote:
That's the first time I have ever encountered this on Linux, Solaris, UTS or any other Unix. That's really very old behavior - there was no change for that in the past few decades at least.
Once one is fallen in that trap, he/she will ever remember. Just imagine files like "-rf" or "--help". While the former would e.g. let rm(1) remove recursively, the latter could make a command in a script return with exit status 0 although it would/should fail.
Thorough quoting/escaping arguments is key.
Have a nice day, Berny
Never came across it in the previous 40+ years. Still scratching my head --- check this! OK for *.png and *.zip but not for *.mp4. slipstream:/home/lancelot/ftp/JUN20 # ls -l *.png -rw-r--r-- 1 lancelot users 5352632 Jun 8 12:39 2020-06-08_02-44-07.png -rw-r--r-- 1 lancelot users 300387 Jun 2 14:37 FT8.png -rw-r--r-- 1 lancelot users 161873 Jun 9 21:47 I2C-Extensio-board-outside-by-DB9.png -rw-r--r-- 1 lancelot users 114208 Jun 8 22:37 I2C-Interface.png -rw-r--r-- 1 lancelot users 313429 Jun 6 11:35 LPF-79e2ba9c21074287b29225ede1e43058.png -rw-r--r-- 1 lancelot users 336419 Jun 6 11:42 LPF-Layout-v1-3204eff11324454d9d5e4949d85d38aa.png -rw-r--r-- 1 lancelot users 362591 Jun 6 11:44 LPF-Layout-v2-dd707d0431f848b085004eeafbb17d93.png -rw-r--r-- 1 lancelot users 38991 Jun 7 01:06 midi-rs232.png -rw-r--r-- 1 lancelot users 23680 Jun 2 22:03 miniswr_sch1.png -rw-r--r-- 1 lancelot users 115143 Jun 7 22:15 PA500 rev1.png -rw-r--r-- 1 lancelot users 343291 Jun 7 22:10 Rune-CW-setup.png slipstream:/home/lancelot/ftp/JUN20 # ls -l *.mp4 ls: invalid option -- '2' Try 'ls --help' for more information. slipstream:/home/lancelot/ftp/JUN20 # slipstream:/home/lancelot/ftp/JUN20 # ls -l *.zip -rw-r--r-- 1 lancelot users 2645200349 Jun 3 17:58 2020-05-27-raspios-buster-full-armhf.zip -rw-r--r-- 1 lancelot users 480547 Jun 6 14:33 HiqSDR_ody_1.3.zip -rw-r--r-- 1 lancelot users 126627 Jun 9 21:58 K9IVB Boards.zip -rw-r--r-- 1 lancelot users 603691229 Jun 2 21:13 pjrc_2017_04_04.zip -rw-r--r-- 1 lancelot users 62339 Jun 2 21:12 PSWR_T_102_RA8875.zip -rw-r--r-- 1 lancelot users 61665 Jun 2 21:18 PSWR_T_103d_RA8875_FT5206_T4.zip -rw-r--r-- 1 lancelot users 19966172 Jun 2 21:38 PWR-SWR_FT5206.zip -rw-r--r-- 1 lancelot users 19420553 Jun 2 21:39 PWR-SWR_GSL1680.zip -rw-r--r-- 1 lancelot users 2627078 Jun 2 21:12 RA8875-0.79b11p10.zip -rw-r--r-- 1 lancelot users 2649667 Jun 2 21:19 RA8875_t4.zip On another box Leap 15.1. bluebell:/GUITAR # ls -l *.mp4 -rw-r--r-- 1 lancelot users 288339235 Apr 20 2014 Guitar_Fretboard_Notes_Memorize.mp4 -rw-r--r-- 1 lancelot users 36577411 Jun 1 17:19 RHYTHM GUITAR Unlocking the Secrets of the Magic 5-Note Box.mp4 -rw-r--r-- 1 lancelot users 23198654 Jun 2 00:10 This Is Better Than The Spider Guitar Exercise-.mp4 Something has definitely changed recently as I have been doing this for mp4 files for at least 8 years. Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Senior Staff Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wednesday 2020-06-10 13:31, Sid Boyce wrote:
Never came across it in the previous 40+ years. Still scratching my head --- check this! OK for *.png and *.zip but not for *.mp4.
slipstream:/home/lancelot/ftp/JUN20 # ls -l *.png -rw-r--r-- 1 lancelot users 5352632 Jun 8 12:39 2020-06-08_02-44-07.png slipstream:/home/lancelot/ftp/JUN20 # ls -l *.mp4 ls: invalid option -- '2' Try 'ls --help' for more information. slipstream:/home/lancelot/ftp/JUN20 #
Something has definitely changed recently as I have been doing this for mp4 files for at least 8 years.
Duh. touch ./-2.png ls -l *.png -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10 Jun 12:31 2020, Sid Boyce wrote:
On 10/06/2020 01:46, Bernhard Voelker wrote:
On 2020-06-10 01:58, Sid Boyce wrote:
That's the first time I have ever encountered this on Linux, Solaris, UTS or any other Unix. That's really very old behavior - there was no change for that in the past few decades at least.
Once one is fallen in that trap, he/she will ever remember. Just imagine files like "-rf" or "--help". While the former would e.g. let rm(1) remove recursively, the latter could make a command in a script return with exit status 0 although it would/should fail.
Thorough quoting/escaping arguments is key.
Have a nice day, Berny
Never came across it in the previous 40+ years. Still scratching my head --- check this! OK for *.png and *.zip but not for *.mp4.
slipstream:/home/lancelot/ftp/JUN20 # ls -l *.png -rw-r--r-- 1 lancelot users 5352632 Jun 8 12:39 2020-06-08_02-44-07.png -rw-r--r-- 1 lancelot users 300387 Jun 2 14:37 FT8.png -rw-r--r-- 1 lancelot users 161873 Jun 9 21:47 I2C-Extensio-board-outside-by-DB9.png -rw-r--r-- 1 lancelot users 114208 Jun 8 22:37 I2C-Interface.png -rw-r--r-- 1 lancelot users 313429 Jun 6 11:35 LPF-79e2ba9c21074287b29225ede1e43058.png -rw-r--r-- 1 lancelot users 336419 Jun 6 11:42 LPF-Layout-v1-3204eff11324454d9d5e4949d85d38aa.png -rw-r--r-- 1 lancelot users 362591 Jun 6 11:44 LPF-Layout-v2-dd707d0431f848b085004eeafbb17d93.png -rw-r--r-- 1 lancelot users 38991 Jun 7 01:06 midi-rs232.png -rw-r--r-- 1 lancelot users 23680 Jun 2 22:03 miniswr_sch1.png -rw-r--r-- 1 lancelot users 115143 Jun 7 22:15 PA500 rev1.png -rw-r--r-- 1 lancelot users 343291 Jun 7 22:10 Rune-CW-setup.png slipstream:/home/lancelot/ftp/JUN20 # ls -l *.mp4 ls: invalid option -- '2'
What does 'alias ls' says? - ismail -- "In this world, you must be oh so smart, or oh so pleasant. Well, for years I was smart. I recommend pleasant." SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany GF: Felix Imendörffer (HRB 36809, AG Nürnberg)
On 10/06/2020 12:35, İsmail Dönmez wrote:
On 10 Jun 12:31 2020, Sid Boyce wrote:
On 10/06/2020 01:46, Bernhard Voelker wrote:
On 2020-06-10 01:58, Sid Boyce wrote:
That's the first time I have ever encountered this on Linux, Solaris, UTS or any other Unix. That's really very old behavior - there was no change for that in the past few decades at least.
Once one is fallen in that trap, he/she will ever remember. Just imagine files like "-rf" or "--help". While the former would e.g. let rm(1) remove recursively, the latter could make a command in a script return with exit status 0 although it would/should fail.
Thorough quoting/escaping arguments is key.
Have a nice day, Berny Never came across it in the previous 40+ years. Still scratching my head --- check this! OK for *.png and *.zip but not for *.mp4.
slipstream:/home/lancelot/ftp/JUN20 # ls -l *.png -rw-r--r-- 1 lancelot users 5352632 Jun 8 12:39 2020-06-08_02-44-07.png -rw-r--r-- 1 lancelot users 300387 Jun 2 14:37 FT8.png -rw-r--r-- 1 lancelot users 161873 Jun 9 21:47 I2C-Extensio-board-outside-by-DB9.png -rw-r--r-- 1 lancelot users 114208 Jun 8 22:37 I2C-Interface.png -rw-r--r-- 1 lancelot users 313429 Jun 6 11:35 LPF-79e2ba9c21074287b29225ede1e43058.png -rw-r--r-- 1 lancelot users 336419 Jun 6 11:42 LPF-Layout-v1-3204eff11324454d9d5e4949d85d38aa.png -rw-r--r-- 1 lancelot users 362591 Jun 6 11:44 LPF-Layout-v2-dd707d0431f848b085004eeafbb17d93.png -rw-r--r-- 1 lancelot users  38991 Jun 7 01:06 midi-rs232.png -rw-r--r-- 1 lancelot users  23680 Jun 2 22:03 miniswr_sch1.png -rw-r--r-- 1 lancelot users 115143 Jun 7 22:15 PA500 rev1.png -rw-r--r-- 1 lancelot users 343291 Jun 7 22:10 Rune-CW-setup.png slipstream:/home/lancelot/ftp/JUN20 # ls -l *.mp4 ls: invalid option -- '2' What does 'alias ls' says?
- ismail
# alias ls alias ls='_ls' -- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Senior Staff Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/06/2020 01:46, Bernhard Voelker wrote:
On 2020-06-10 01:58, Sid Boyce wrote:
That's the first time I have ever encountered this on Linux, Solaris, UTS or any other Unix.
That's really very old behavior - there was no change for that in the past few decades at least.
Once one is fallen in that trap, he/she will ever remember. Just imagine files like "-rf" or "--help". While the former would e.g. let rm(1) remove recursively, the latter could make a command in a script return with exit status 0 although it would/should fail.
Thorough quoting/escaping arguments is key.
Have a nice day, Berny
Never came across it in the previous 40+ years. Still scratching my head --- check this! OK for *.png and *.zip but not for *.mp4.
slipstream:/home/lancelot/ftp/JUN20 # ls -l *.png -rw-r--r-- 1 lancelot users 5352632 Jun 8 12:39 2020-06-08_02-44-07.png -rw-r--r-- 1 lancelot users 300387 Jun 2 14:37 FT8.png -rw-r--r-- 1 lancelot users 161873 Jun 9 21:47 I2C-Extensio-board-outside-by-DB9.png -rw-r--r-- 1 lancelot users 114208 Jun 8 22:37 I2C-Interface.png -rw-r--r-- 1 lancelot users 313429 Jun 6 11:35 LPF-79e2ba9c21074287b29225ede1e43058.png -rw-r--r-- 1 lancelot users 336419 Jun 6 11:42 LPF-Layout-v1-3204eff11324454d9d5e4949d85d38aa.png -rw-r--r-- 1 lancelot users 362591 Jun 6 11:44 LPF-Layout-v2-dd707d0431f848b085004eeafbb17d93.png -rw-r--r-- 1 lancelot users 38991 Jun 7 01:06 midi-rs232.png -rw-r--r-- 1 lancelot users 23680 Jun 2 22:03 miniswr_sch1.png -rw-r--r-- 1 lancelot users 115143 Jun 7 22:15 PA500 rev1.png -rw-r--r-- 1 lancelot users 343291 Jun 7 22:10 Rune-CW-setup.png slipstream:/home/lancelot/ftp/JUN20 # ls -l *.mp4 ls: invalid option -- '2' Try 'ls --help' for more information. slipstream:/home/lancelot/ftp/JUN20 #
slipstream:/home/lancelot/ftp/JUN20 # ls -l *.zip -rw-r--r-- 1 lancelot users 2645200349 Jun 3 17:58 2020-05-27-raspios-buster-full-armhf.zip -rw-r--r-- 1 lancelot users 480547 Jun 6 14:33 HiqSDR_ody_1.3.zip -rw-r--r-- 1 lancelot users 126627 Jun 9 21:58 K9IVB Boards.zip -rw-r--r-- 1 lancelot users 603691229 Jun 2 21:13 pjrc_2017_04_04.zip -rw-r--r-- 1 lancelot users 62339 Jun 2 21:12 PSWR_T_102_RA8875.zip -rw-r--r-- 1 lancelot users 61665 Jun 2 21:18 PSWR_T_103d_RA8875_FT5206_T4.zip -rw-r--r-- 1 lancelot users 19966172 Jun 2 21:38 PWR-SWR_FT5206.zip -rw-r--r-- 1 lancelot users 19420553 Jun 2 21:39 PWR-SWR_GSL1680.zip -rw-r--r-- 1 lancelot users 2627078 Jun 2 21:12 RA8875-0.79b11p10.zip -rw-r--r-- 1 lancelot users 2649667 Jun 2 21:19 RA8875_t4.zip
On another box Leap 15.1.
bluebell:/GUITAR # ls -l *.mp4 -rw-r--r-- 1 lancelot users 288339235 Apr 20 2014 Guitar_Fretboard_Notes_Memorize.mp4 -rw-r--r-- 1 lancelot users 36577411 Jun 1 17:19 RHYTHM GUITAR Unlocking the Secrets of the Magic 5-Note Box.mp4 -rw-r--r-- 1 lancelot users 23198654 Jun 2 00:10 This Is Better Than The Spider Guitar Exercise-.mp4
Something has definitely changed recently as I have been doing this for mp4 files for at least 8 years.
Regards
Sid. No it hasn't. At least 10 years ago I ran into this, when I made a typo in a
Op woensdag 10 juni 2020 13:31:03 CEST schreef Sid Boyce: script that generated filenames *beginning* with a dash ( "-" ). The examples you provide do not contain such filenames. -- Gertjan Lettink a.k.a. Knurpht openSUSE Forums Team -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed, 10 Jun 2020 13:44:22 +0200 Knurpht-openSUSE wrote:
Something has definitely changed recently as I have been doing this for mp4 files for at least 8 years. Sid, the recent change was probably that you created the file "-23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4" which is the reason.
No it hasn't. At least 10 years ago I ran into this, when I made a typo in a script that generated filenames *beginning* with a dash ( "-" ). The examples you provide do not contain such filenames. the file above is shown in the ls output: https://lists.opensuse.org/opensuse-factory/2020-06/msg00116.html
lancelot@slipstream:~/ftp/JUN20> ls Amp Up A QRP Ham Radio With MX-P50M.mp4 -23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4 Regards, Dieter -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/06/2020 12:57, dieter wrote:
On Wed, 10 Jun 2020 13:44:22 +0200 Knurpht-openSUSE wrote:
Something has definitely changed recently as I have been doing this for mp4 files for at least 8 years. Sid, the recent change was probably that you created the file "-23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4" which is the reason.
No it hasn't. At least 10 years ago I ran into this, when I made a typo in a script that generated filenames *beginning* with a dash ( "-" ). The examples you provide do not contain such filenames. the file above is shown in the ls output: https://lists.opensuse.org/opensuse-factory/2020-06/msg00116.html
lancelot@slipstream:~/ftp/JUN20> ls
Amp Up A QRP Ham Radio With MX-P50M.mp4
-23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4
Regards, Dieter
That was the filename as downloaded, renaming it without the "-" solved the problem. 23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4 Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Senior Staff Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/06/2020 12:44, Knurpht-openSUSE wrote:
On 10/06/2020 01:46, Bernhard Voelker wrote:
On 2020-06-10 01:58, Sid Boyce wrote:
That's the first time I have ever encountered this on Linux, Solaris, UTS or any other Unix. That's really very old behavior - there was no change for that in the past few decades at least.
Once one is fallen in that trap, he/she will ever remember. Just imagine files like "-rf" or "--help". While the former would e.g. let rm(1) remove recursively, the latter could make a command in a script return with exit status 0 although it would/should fail.
Thorough quoting/escaping arguments is key.
Have a nice day, Berny Never came across it in the previous 40+ years. Still scratching my head --- check this! OK for *.png and *.zip but not for *.mp4.
slipstream:/home/lancelot/ftp/JUN20 # ls -l *.png -rw-r--r-- 1 lancelot users 5352632 Jun 8 12:39 2020-06-08_02-44-07.png -rw-r--r-- 1 lancelot users 300387 Jun 2 14:37 FT8.png -rw-r--r-- 1 lancelot users 161873 Jun 9 21:47 I2C-Extensio-board-outside-by-DB9.png -rw-r--r-- 1 lancelot users 114208 Jun 8 22:37 I2C-Interface.png -rw-r--r-- 1 lancelot users 313429 Jun 6 11:35 LPF-79e2ba9c21074287b29225ede1e43058.png -rw-r--r-- 1 lancelot users 336419 Jun 6 11:42 LPF-Layout-v1-3204eff11324454d9d5e4949d85d38aa.png -rw-r--r-- 1 lancelot users 362591 Jun 6 11:44 LPF-Layout-v2-dd707d0431f848b085004eeafbb17d93.png -rw-r--r-- 1 lancelot users 38991 Jun 7 01:06 midi-rs232.png -rw-r--r-- 1 lancelot users 23680 Jun 2 22:03 miniswr_sch1.png -rw-r--r-- 1 lancelot users 115143 Jun 7 22:15 PA500 rev1.png -rw-r--r-- 1 lancelot users 343291 Jun 7 22:10 Rune-CW-setup.png slipstream:/home/lancelot/ftp/JUN20 # ls -l *.mp4 ls: invalid option -- '2' Try 'ls --help' for more information. slipstream:/home/lancelot/ftp/JUN20 #
slipstream:/home/lancelot/ftp/JUN20 # ls -l *.zip -rw-r--r-- 1 lancelot users 2645200349 Jun 3 17:58 2020-05-27-raspios-buster-full-armhf.zip -rw-r--r-- 1 lancelot users 480547 Jun 6 14:33 HiqSDR_ody_1.3.zip -rw-r--r-- 1 lancelot users 126627 Jun 9 21:58 K9IVB Boards.zip -rw-r--r-- 1 lancelot users 603691229 Jun 2 21:13 pjrc_2017_04_04.zip -rw-r--r-- 1 lancelot users 62339 Jun 2 21:12 PSWR_T_102_RA8875.zip -rw-r--r-- 1 lancelot users 61665 Jun 2 21:18 PSWR_T_103d_RA8875_FT5206_T4.zip -rw-r--r-- 1 lancelot users 19966172 Jun 2 21:38 PWR-SWR_FT5206.zip -rw-r--r-- 1 lancelot users 19420553 Jun 2 21:39 PWR-SWR_GSL1680.zip -rw-r--r-- 1 lancelot users 2627078 Jun 2 21:12 RA8875-0.79b11p10.zip -rw-r--r-- 1 lancelot users 2649667 Jun 2 21:19 RA8875_t4.zip
On another box Leap 15.1.
bluebell:/GUITAR # ls -l *.mp4 -rw-r--r-- 1 lancelot users 288339235 Apr 20 2014 Guitar_Fretboard_Notes_Memorize.mp4 -rw-r--r-- 1 lancelot users 36577411 Jun 1 17:19 RHYTHM GUITAR Unlocking the Secrets of the Magic 5-Note Box.mp4 -rw-r--r-- 1 lancelot users 23198654 Jun 2 00:10 This Is Better Than The Spider Guitar Exercise-.mp4
Something has definitely changed recently as I have been doing this for mp4 files for at least 8 years.
Regards
Sid. No it hasn't. At least 10 years ago I ran into this, when I made a typo in a
Op woensdag 10 juni 2020 13:31:03 CEST schreef Sid Boyce: script that generated filenames *beginning* with a dash ( "-" ). The examples you provide do not contain such filenames.
Now I get it, it was because the one file started with a "-", renamed it without the "-" and all is OK. No doubt the first time I came across such a filename. lancelot@slipstream:~/ftp/JUN20> ls -l *.mp4 -rw-r--r-- 1 lancelot users 16865338 Jun 2 22:20 23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4 -rw-r--r-- 1 lancelot users 72690162 Jun 8 12:46 Amp Up A QRP Ham Radio With MX-P50M.mp4 -rw-r--r-- 1 lancelot users 73206668 Jun 7 19:23 F5NPV - Quisk - Midi controller and Raspberry PI.mp4 -rw-r--r-- 1 lancelot users 103707368 Jun 6 20:52 Rust Tutorial Rust Programming Language Tutorial For Beginners Rust Training Edureka.mp4 -rw-r--r-- 1 lancelot users 116580605 Jun 6 20:46 The New Frontier A Gentle Introduction to Rust - Matthew Gathu.mp4 Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Senior Staff Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed, Jun 10, 2020 at 01:29:03PM +0100, Sid Boyce wrote:
Now I get it, it was because the one file started with a "-", renamed it without the "-" and all is OK. No doubt the first time I came across such a filename.
Let me try to explain the full story. The key information is that unlike in the old times of MS-DOS, the wildcards are expanded by shell and this happens _before_ the argument list is passed to the program. Therefore if you have (only) e.g. a.txt, b.txt and c.txt in current directory, there is no difference between ls -l *.txt ls -l a.txt b.txt c.txt (if there is a matching name with spaces, you would have to escape it on second line). Names starting with a dash behave the same so with "-a" and "foo", there is no difference between ls -l * ls -l -a foo and the command has no way to recognize that "-l" is an option actually entered and "-a" is not. Michal -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/06/2020 13.31, Sid Boyce wrote: ...
Never came across it in the previous 40+ years. Still scratching my head --- check this! OK for *.png and *.zip but not for *.mp4.
Sure, because you have a file named "-23133 Safe...mp4" and you do not have a file named "-23133 Safe.png". The command line "ls *.mp4" expands to something like: ls -23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4 The New Frontier A Gentle Introduction to Rust - Matthew Gathu.mp4 The "ls" command never sees the asterisk, it is expanded. And yes, this is standard behaviour in unix or linux since ever. I don't like it, but that's how it is. You can probably run a trace and find out. It is bash which is doing this, not konsole. Try xterm, it will be the same. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
On 2020-06-10 13:31, Sid Boyce wrote:
slipstream:/home/lancelot/ftp/JUN20 # ls -l *.mp4 ls: invalid option -- '2' Try 'ls --help' for more information.
As already said: there is a file with a name that starts with "-2". To see what would be executed, just prepend the whole ting with "echo": $ touch ./-2badname.mp4 good.mp4 $ ls -l *.mp4 ls: invalid option -- '2' Try 'ls --help' for more information. $ echo ls -l *.mp4 ls -l -2badname.mp4 good.mp4 Have a nice day, Berny -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/06/2020 21:32, Bernhard Voelker wrote:
echo ls -l *.mp4 I copied it to -2333.mp4
echo ls -l *.mp4 ls -l 23133 Safe Shutdown for Raspberry Pi with Super Capacitors.mp4 -2333.mp4 Amp Up A QRP Ham Radio With MX-P50M.mp4 F5NPV - Quisk - Midi controller and Raspberry PI.mp4 Rust Tutorial Rust Programming Language Tutorial For Beginners Rust Training Edureka.mp4 The New Frontier A Gentle Introduction to Rust - Matthew Gathu.mp4
lancelot@slipstream:~/ftp/JUN20> ls -l -2333.mp4 23133\ Safe\ Shutdown\ for\ Raspberry\ Pi\ with\ Super\ Capacitors.mp4 ls: invalid option -- '2' Try 'ls --help' for more information. Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Senior Staff Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (8)
-
Bernhard Voelker
-
Carlos E. R.
-
dieter
-
İsmail Dönmez
-
Jan Engelhardt
-
Knurpht-openSUSE
-
Michal Kubecek
-
Sid Boyce