Fd: Output to find format?

Created on 28 Aug 2019  路  2Comments  路  Source: sharkdp/fd

I prefer to use fd over find but sometimes the default output doesn't seem to play nicely when piped to other programs (in my case rmlint). Is there a flag that I am missing to make this easier?
(I really just mean the ./ before each file or directory)

e.g. the behaviour under find might be:

$ find .
.
./file3.txt
./file2.txt
./file1.txt
./directory1
./directory1/file4.txt

With fd:

$ fd
directory1
directory1/file4.txt
file1.txt
file2.txt
file3.txt

I am currently working around the issue by using --exec echo but this affects performance:

$ fd --exec echo "./{}"
./file3.txt
./file2.txt
./file1.txt
./directory1
./directory1/file4.txt

Am I doing this right?

question

All 2 comments

Would the -a/--absolute-path option work for you?

Thanks. Yes, I managed to make that work and for it to perform rapidly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hungptit picture hungptit  路  3Comments

nishithkhanna picture nishithkhanna  路  4Comments

sharkdp picture sharkdp  路  3Comments

mathomp4 picture mathomp4  路  4Comments

Dietr1ch picture Dietr1ch  路  3Comments