3 ms·
>One reason I haven’t picked up any of these newfangled Rust tools like bat, exa, or fd is that I can barely remember the options for the originals. But that's
by jhbadger 2y ago
>One reason I haven’t picked up any of these newfangled Rust tools like bat, exa, or fd is that I can barely remember the options for the originals.
But that's exactly the reason to use the newer tools -- they just make more sense -- especially fd over find. I've been using UNIX for over thirty years and find just never clicked with me.
- deleted 2y ago[deleted]
- scorcessse 2y ago[flagged]
- TylerE 2y agoHave you ever tried to actually learn something from a manpage?
- dmitrygr 2y agoYes. All the unix tools. I survived, too
- EMIRELADERO 2y agoAnd here I was thinking the RTFM days were over...
- lolinder 2y ago> This is how good things turn to crap: people want to be accommodated rather than have to learn something new. Funny, this sounds more like an explanation for how we get stuck with crap and aren't able to move on to better interfaces.
- TylerE 2y agoConfession; the only way I’ve ever actually used find is just a tree walker piping to grep to actually find whatever.
- mat_b 2y ago[dead]
- quinncom 2y agofd is probably better for most tasks, but sometimes it seems more cumbersome than find. E.g., to delete all files inside a cache directory, this is the simplest syntax I could find: fd -t f -X rm {} \; ^ cache Which makes me really nervous, so usually I fall back to using find: find cache -type f -delete Maybe this is foolproof for me only because I’ve been using find for decades. Is there a version of this for fd that inspires more confidence?
- orlp 2y agoI would suggest fd -t f . cache -X rm -- Which reads as find "any file", "matching .", "in directory cache", then "execute rm -- followed by an argument list of all found files". This ensures even if you have filenames starting with - they won't be interpreted as options for rm. For even more sanity of mind you may want to turn on -a for absolute paths, although I don't see an example right now where using relative paths would go wrong.
- quinncom 2y agoYes, that looks safer. I didn't realize I could put the `-X` option at the end. The man page says: Usage: fd [OPTIONS] [pattern] [path]... So, I presumed the path had to go last.