News for hackers. Stuff that matters.
Re:Making Hard Things Easy by lazide on Friday October 06, 2023 @03:49PM (#37795389)
Find has a particularly bad man page to find things that way.
Re:Making Hard Things Easy by tripleo1 on Friday October 06, 2023 @04:32PM (#37795994)
FWIW it's `-maxdepth 1` not `-depth 1`.

But yeah, you're right.

Re:Making Hard Things Easy by lazide on Friday October 06, 2023 @10:42PM (#37798576)
Dude, flashbacks. Aren’t you supposed to do a trigger warning or something first! ;)
Re:Making Hard Things Easy by imp0cat on Friday October 06, 2023 @06:18PM (#37797071)
AFAIK there is a find replacement with sane defaults: https://github.com/sharkdp/fd , a lot of people I know love it.

However, I already have this in my muscle memory: find <where> -name '<what>' -type f(file)/d(directory)

Works in 90% of situations when searching for some file in terminal, ie: find / -name 'stuff*'

The rest of the time is spent figuring out exec/xargs. :)

And once you master that, swap xargs for GNU parallel. I bet your machine has a ton of cores, don't let then sit idly. ;)

Re:Making Hard Things Easy by anjanb on Saturday October 07, 2023 @02:14PM (#37804127)
you can grep the man page contents by using the following command

man <command> | col -b | grep "search_string"