On 16/03/2021 01.32, David Haller wrote:
Hello,
On Mon, 15 Mar 2021, David T-G wrote: [..]
Hmmmm ... Do char classes work for ls for you? Not for me on Leap 15.2:
diskfarm:/tmp/X # ls -la -rw-r--r-- 1 root root 0 Mar 15 22:27 .abc -rw-r--r-- 1 root root 0 Mar 15 22:27 .x diskfarm:/tmp/X # ls -la .[:alnum:]* -rw-r--r-- 1 root root 0 Mar 15 22:27 .abc diskfarm:/tmp/X # ls -la .[:alnum:] ls: cannot access '.[:alnum:]': No such file or directory
Simple: you botched it! *hrhr* ;)
The argument '.[:alnum:]*' does not contain a char-class, but specifies, that any of the characters 'a', 'l', ':', 'n', 'u' or 'm' should follow the leading '.', followed by anything (per the '*').
RTFM: man 7 glob, cf. man 7 regex.
Correct is: 'ls -la .[[:alnum:]]*'
No, it looks inside subdirectories. cer@Telcontar:~> ls -la .[[:alnum:]]* -rw------- 1 cer users 38861 Mar 12 10:07 .ICEauthority -rw-r--r-- 1 cer users 60 Aug 6 2009 .ImpressPrototypeRC ... rw-r--r-- 1 cer users 135841 Oct 11 11:55 .y2log -rw-r--r-- 1 cer users 282 Sep 25 2010 .y2usersettings .AbiSuite: total 68 drwx------ 2 cer users 4096 Nov 6 2016 . drwxr-x--- 223 cer users 40960 Mar 15 22:24 .. -rw-r--r-- 1 cer users 173 Nov 6 2016 AbiCollab.Profile -rw-r--r-- 1 cer users 15443 Nov 6 2016 AbiWord.Profile -rw-r--r-- 1 cer users 64 Oct 7 2005 coquille.conf .Heaven: total 76 drwxr-xr-x 3 cer users 4096 Dec 24 2018 . drwxr-x--- 223 cer users 40960 Mar 15 22:24 .. -rw-r--r-- 1 cer users 9532 Dec 30 2018 heaven_4.0.cfg -rw-r--r-- 1 cer users 15751 Dec 30 2018 log.html drwxr-xr-x 2 cer users 4096 Dec 30 2018 save -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)