Questions tagged [fd]

A user-friendly alternative to find command

13 questions
2
votes
1 answer

How to exclude all hidden folders except content of .config with fdfind?

Using fd also known as fdfind, how would I go about not including any hidden directories and files except for all the content in the .config directory?
2
votes
0 answers

find (fd) execute with custom function and multiple parameters

I'm quite new to bash scripting so excuse the rough script. I'm writing a simple script that goes through all directories that has a .git directory in them, and checks if the worktree is clean or dirty. It works, but I want to have 3…
Albert
  • 131
  • 2
2
votes
1 answer

Extract the number of pages of PDFs recursively and dump them to a CSV

I need to get a list of PDFs in various sub-folders of a directory structure and the number of pages of each PDF file. All saved into a CSV file, i.e. ,. I have used fd and qpdf to extract the number of pages…
Marco
  • 23
  • 4
1
vote
1 answer

fd-find does not find anything

fd-find does not finding anything. When searching something in home directory it instantly exists without any error. ❯ mkdir root ❯ cd root ❯ touch test ❯ ls -l total 0 -rw-rw-r-- 1 s1n7ax s1n7ax 0 Jul 6 21:29 test ❯ which…
s1n7ax
  • 387
  • 3
  • 12
1
vote
1 answer

How to display file and folder properties from search

I thought this would be easy and there are a lot of somewhat close threads on the internet, but nothing quite right. I want to use fd (simple find command) to display just file name and file size (preferably in mb, or formatted more readable than…
1toneboy
  • 103
  • 9
1
vote
1 answer

fd --exclude all except dir1 dir2

fd searches files and directories, and can be called with except or prune as an option to limit the results. Is there a way to search only for specified directories? I want to use fd, in fzf, and have the results always computed quickly (so the…
Pound Hash
  • 268
  • 4
  • 14
1
vote
1 answer

Anchored excludes with find or fd

Let's say I want to find all files in a directory (recursively), but omit those e.g. in .git and node_modules subdirectories. I can do: $ fd -uut f -E .git -E node_modules But that will, for example, exclude ./some/dir/node_modules/* or some…
x-yuri
  • 3,223
  • 10
  • 39
  • 62
0
votes
1 answer

Fuzzy finding directories is slow

I have following bash script to find git repositories. echo "$(fd -I -i -H -E '.local' -E '.cargo' -E '.password-store' -t d ^.git$ ~ -x 'echo' '{//}' | sk)" fd pipes search results to sk (fzf rust alternative) as they are being found but selecting…
s1n7ax
  • 387
  • 3
  • 12
0
votes
1 answer

How to search for directory containing file

I just discovered fzf (fuzzy finder) and now want to achieve the following using fd (https://github.com/sharkdp/fd): From the current directory find immediate parent directories of all files that match the string I typed as well as find directories…
Richard
  • 101
0
votes
0 answers

Does `fd-find` have an internal max-depth?

I have a bunch of files named like fn._mm* in a…
polemon
  • 11,133
  • 11
  • 69
  • 111
0
votes
2 answers

why i need to run pipe(2) so i can share data between processes?

This is a follow-up question, UNIX-focused i m trying to implement my own shell and i got stuck in the pipe feature after some research i found out that i need to run pipe(2) to share data between processes but i don't why i need that my first…
0
votes
1 answer

Rename Subdirectories Recursively

I am trying to rename the following directory structure Tests Directory ├── Test1 Directory │ ├── 2 - 1. Data │ ├── 3 - 2. Data │ ├── 4 - 3. Data │ ├── 5 - 4. Data │ ├── 6 - 5. Data ├── Test2 Directory │ ├── 2 - 1. Data │ ├── 3 - 2.…
Ahmad Ismail
  • 2,478
  • 1
  • 22
  • 47
0
votes
1 answer

List all directories in home folder with fd

I'm trying to write a shell function to rapidly cd into any directory in my home folder, using the fd and fzf programs. This is what I have so far function fdcd() { cd "$(fd --type d --ignore-file ~/.config/fd/ignore --hidden | fzf)" } which has…
noibe
  • 387
  • 3
  • 15