Sample Header Ad - 728x90

How to get dirname from path

-2 votes
1 answer
2261 views
I have this: find . -type f -name '*_test.go' | xargs dirname but I get: > usage: dirname path the output of $ find . -type f -name '*_test.go' is: ./pkg_test.go ./v3/organization/organization_test.go ./v3/common/pkg_test.go ./v3/model/boil_main_test.go ./v3/model/boil_queries_test.go ./v3/model/advances_test.go ./v3/model/boil_suites_test.go ./v3/model/psql_main_test.go ./v3/model/psql_suites_test.go anyone know how I can get the dirname of the file? Maybe I need absolute paths?
Asked by Alexander Mills (10744 rep)
Jan 20, 2020, 09:18 PM
Last activity: Jan 20, 2020, 09:51 PM