I use this command trying to find a file in /etc whose name contains "spf",
root@cloud:~# cd /etc/
root@cloud:/etc# ls *spf*
policyd-spf.conf
But this file is not listed by 'ls' command.
# ls /etc/policyd-spf.conf
ls: cannot access '/etc/policyd-spf.conf': No such file or directory
instead it's located in a subdir of /etc,
# cd /etc/postfix-policyd-spf-python/
# ls policyd-spf.conf
policyd-spf.conf
it seems strange to me. does glob will search for subdir but won't return
its path?
Hi
I use this command trying to find a file in /etc whose name contains "spf",
root@cloud:~# cd /etc/
root@cloud:/etc# ls *spf*
policyd-spf.conf
But this file is not listed by 'ls' command.
# ls /etc/policyd-spf.conf
ls: cannot access '/etc/policyd-spf.conf': No such file or directory
instead it's located in a subdir of /etc,
# cd /etc/postfix-policyd-spf-python/
# ls policyd-spf.conf
policyd-spf.conf
it seems strange to me. does glob will search for subdir but won't return
its path?
All these years of using ls and locate myself, just had an ah-ha moment triggered by the above. Tried my favored (cognitively friendly) grep:
PS Yeah, I know, some directories go very deep. I'm pretending those
don't exist just this second. Searches I've performed are much specific
than just "wi" so the results list would remain small for deeper
queries. Works for my humble single user needs. :)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 158:10:07 |
Calls: | 10,384 |
Calls today: | 1 |
Files: | 14,056 |
Messages: | 6,416,482 |