Hacker News new | ask | show | jobs
by hutzlibu 1912 days ago
Or simply how to find a file. I gave up and used the file explorer's search function, because I did not wanted to google it. Just a simple example of the most frequent use cases. Thats allmost all I want, together with a listing of the various flags and short, but useful description .
2 comments

Complaining about the manpages for `find` is maybe the worst example you could make, since `find` has surprisingly many examples on its pages. Open the pages and search for `examples` and you'll see what I mean.
Sorry I meant locate.

But as for find ... are you serious? I said simple example.

There are lots of examples, yes, but all do quite complicated stuff (and I had to scroll lots of text to get there). I mean, I can use them, sure, I studied IT. But at that moment, I just wanted to look for one file on all my hd. Not find files with readpermission flag in combination with deleting etc.

Imagine a newb. Make things simple. That means you start with the easy things.

Like in the case of find, with an example, that looks on a given path for that string.

And if I know that, I can work myself up, if I want to.

But don't bombard people with information they do not need or want. And if people manage

Yeah, 100% serious. First example from manpages on `find`:

     Simple `find|xargs` approach

       Find files named core in or below the directory /tmp and delete them.

       $ find /tmp -name core -type f -print | xargs /bin/rm -f

Pretty simple to understand what's going on here. `-name` allows you to specify what filename you're searching for, `/tmp` (first argument) is the directory to search in and `-type` helps you select what kind of thing to search for. Remove the last part as you don't care about deleting anything.

It's really that simple. In fact, unsure how it even can get easier. Just because there are complex examples doesn't mean you can understand the snippets you need and ignore the rest.

And no, manpages are not for newbies who don't know how to A) read manuals B) have no idea about unix. They are for people who are looking for specific pieces of data related to a tool they are using, manpages are reference manuals and they will stay like that.

If you need tutorials/guides, there are plenty of other tools for that. I recently found out about the `info` program that does what you're looking for as well.

" I recently found out about the `info` program that does what you're looking for as well."

No, it does not. I am looking for simple straight forward information.

Info does also not provide that in the examples I tried.

There seems a culture problem. Some people like it complicated and as information dense as possible?

Well, I don't. I know how to read very deep technical information if I have to. But I prefer it simple and structured. So I only see the information I want and not all the obscure use cases too. That cost energy filtering it out. Energy I want to use to get things done.

And btw. I was once introduced to Linux with manpages as the way to go. No wonder linux never reached the masses.

If you check at the end of the man page, you'll see that usually an info page is mentioned.

Have an online example which illustrates all possible file finding examples you could ever need: https://www.gnu.org/software/findutils/manual/html_mono/find...

Thx, but I successfully used find before and know how to google it. That was my point, googling it is much simpler and straightforward than the manpage if you forgot the syntax.
Indeed, problem is when you don't have internet because your infrastructure is gone and you're the sysadmin. And most importantly, use what you prefer