Re:An Illustrated Guide to Useful Command Line Tools
by nebulous1 on Saturday October 26, 2019 @02:28PM
(#21365344)
You might like zsh if you haven't tried it. Has a builtin `zmv` that does this. Check out oh-my-zsh
[ Parent
| on HN ]
Re:An Illustrated Guide to Useful Command Line Tools
by dickeytk on Saturday October 26, 2019 @02:38PM
(#21365402)
This suggestion is exactly why fd is so helpful. With zmv I can rename files in a directory. Great.
But what if I want to count the number of total files within each directory? Create tarballs out of each directory? Rename files that contain the word "FOOBAR" in them?
I can do this with fd and similar tools with slight modifications. With zmv I can rename files.
Re:An Illustrated Guide to Useful Command Line Tools
by nebulous1 on Saturday October 26, 2019 @05:18PM
(#21366278)
Cool! zsh also does a few things other than renaming files.
Re:An Illustrated Guide to Useful Command Line Tools
by jdc on Saturday October 26, 2019 @03:05PM
(#21365537)
How do you rename files based on contents with fd?
Re:An Illustrated Guide to Useful Command Line Tools
by dickeytk on Saturday October 26, 2019 @03:13PM
(#21365579)
I would use rg. My original point is not that fd is a do anything tool, it’s that fd and others are a much better replacements for find, grep, etc that when I want to do something complex they’re much better starting places.