Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add usage examples to the README #57

Closed
7 tasks
sharkdp opened this issue Sep 29, 2017 · 8 comments
Closed
7 tasks

Add usage examples to the README #57

sharkdp opened this issue Sep 29, 2017 · 8 comments

Comments

@sharkdp
Copy link
Owner

sharkdp commented Sep 29, 2017

For example:

  • Searching for a substring: fd todo
  • Searching for a substring in another location: fd apache /var/log
  • Use fd as an alternative for ls -R: fd
  • Searching all files (including hidden and ignored files): fd -HI ....
  • Searching for a file extension (see also Add option to only search file extensions? #56)
  • Piping output to xargs: fd -0 ... | xargs -0 du -h
  • Show absolute paths (either via -a or by providing an absolute path as destination)
@cravend
Copy link

cravend commented Sep 29, 2017

I'd be happy to help with this! Installing fd now so I can test it out.

@sharkdp
Copy link
Owner Author

sharkdp commented Sep 29, 2017

@cravend Sounds great! Any help would be greatly appreciated.

@cravend
Copy link

cravend commented Sep 29, 2017

@sharkdp sorry about this, but realized this might not work the best for me--currently windows only. Product looks cool though, good luck!

@deg4uss3r
Copy link
Contributor

I can help with this! Would you like simple examples, or a fancy gif like the README already has :)

@sharkdp
Copy link
Owner Author

sharkdp commented Sep 30, 2017

@cravend no worries. Thanks for considering. fd should work on Windows, though.

@deg4uss3r I think simple markdown code blocks or maybe static screenshots would be great.

@marko-avlijas
Copy link

Please add example how to find and delete files. Ideally translate this example to fd.

find . -iname "**.sw?" -delete   # delete vim swap files in current directory

@sharkdp
Copy link
Owner Author

sharkdp commented Jan 9, 2019

That example in fd would be:

fd '\.sw.$' -x rm

Please always check what is going to be removed first (Your pattern also matches .swf Flash files, for example!):

fd '\.sw.$'

@marko-avlijas
Copy link

marko-avlijas commented Jan 9, 2019

Thanks. Only -H is missing because vim swap files start with .

fd -H '\.sw.$'          # find all vim swap files
fd -H '\.sw.$' -x rm   #  find and delete all vim swap files

I think this is good addition to README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants