Comments on: 10 Practical Examples Using Wildcards to Match Filenames in Linux https://www.tecmint.com/use-wildcards-to-match-filenames-in-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Thu, 13 Jul 2023 09:58:44 +0000 hourly 1 By: Anna https://www.tecmint.com/use-wildcards-to-match-filenames-in-linux/comment-page-1/#comment-1774921 Tue, 26 Apr 2022 04:45:57 +0000 https://www.tecmint.com/?p=27490#comment-1774921 How to get the list of files with space and e.g. a V as in “myfile V.txt”?

ls * V*
ls "* V*"
ls '* V*'
ls *[ ]V*
]]>
By: jag https://www.tecmint.com/use-wildcards-to-match-filenames-in-linux/comment-page-1/#comment-1334279 Mon, 18 May 2020 21:57:43 +0000 https://www.tecmint.com/?p=27490#comment-1334279 In reply to Johny Why.

Actually, it did do the match as requested; the trick is that what it found wasn’t actually a flat-file. On my box, it’s actually a symbolic link to a directory. So what it’s actually showing is the contents of that directory.

You can see this if you start with this:

# ls -ld /sys/class/net/wl*
]]>
By: Johny Why https://www.tecmint.com/use-wildcards-to-match-filenames-in-linux/comment-page-1/#comment-1303691 Sat, 07 Dec 2019 21:17:25 +0000 https://www.tecmint.com/?p=27490#comment-1303691 This gives all contents, as expected:

$ ls /sys/class/net

ens4 lo wlp0s26f7u2

But this filter DOESN’T return wlp0s26f7u2, as expected:

$  ls /sys/class/net/wl*

addr_assign_type  carrier             dev_id    duplex             ifindex    name_assign_type  phys_port_id    proto_down  subsystem     wireless
addr_len          carrier_changes     dev_port  flags              iflink     netdev_group      phys_port_name  queues      tx_queue_len
address           carrier_down_count  device    gro_flush_timeout  link_mode  operstate         phys_switch_id  speed       type
broadcast         carrier_up_count    dormant   ifalias            mtu        phy80211          power           statistics  uevent

What am I doing wrong?

thanks

]]>
By: Aaron Kili https://www.tecmint.com/use-wildcards-to-match-filenames-in-linux/comment-page-1/#comment-920556 Mon, 09 Oct 2017 12:21:07 +0000 https://www.tecmint.com/?p=27490#comment-920556 In reply to ks.

@ks

Here, a character means alphanumeric characters or all valid filename characters. It also matches no character(nothing).

]]>
By: ks https://www.tecmint.com/use-wildcards-to-match-filenames-in-linux/comment-page-1/#comment-920283 Mon, 09 Oct 2017 01:55:59 +0000 https://www.tecmint.com/?p=27490#comment-920283 An asterisk (*) – matches zero or more occurrences of any character, number.

]]>