Closed ossie-git closed 6 months ago
I'm currently trying to match the following file:
ubuntu2204:/run/timeshift# ls -l backup/etc/passwd -rw-r--r-- 1 root root 1829 Nov 30 2022 backup/etc/passwd
but can't. I've tried the following different patterns but none of them match:
# fd etc/passwd # fd 'etc/passwd' # fd 'etc\/passwd' # fd '.*etc/passwd' # fd -F "etc/passwd" # fd -u '.*etc/passwd' # fd -u '.*/etc/passwd' # fd -u '[.]+etc/passwd' # fd -u '[.]+/etc/passwd'
I have to basically grep to get it:
# fd passwd | grep -i "etc/passwd$" backup/etc/passwd backup/timeshift/snapshots/2024-05-07_22-43-16/localhost/etc/passwd
Am I missing something?
The regex should match
fd
fd 10.0.0
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy
By default fd only matches against the basename. To get something with multiple components you need to use the --full-path or -p option.
--full-path
-p
Thanks
Checks
Describe the bug you encountered:
I'm currently trying to match the following file:
but can't. I've tried the following different patterns but none of them match:
I have to basically grep to get it:
Am I missing something?
Describe what you expected to happen:
The regex should match
What version of
fd
are you using?fd 10.0.0
Which operating system / distribution are you on?