Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
On OS X, why does sudo ls show hidden (dot) files? (superuser.com)
124 points by Zirro on June 24, 2015 | hide | past | favorite | 36 comments


The problem with such thoroughly robust StackOverflow answers as this; when I stumble across one as I occasionally do, so taken aback am I by it's succinct completeness that it becomes irreversably embedded into my limited brain space.

I am afraid that one day I will come across an answer so comprehensive I will forget how to ride a bicycle.


That takes about eight months of practice apparently.

https://m.youtube.com/watch?v=MFzDaBzBlL0


That's pretty interesting in the context of sailing. It doesn't seem to take much time at all for people to adjust between a tiller and a wheel, or standing behind or in front of a wheel. I think a lot of that has to do with sensing that force is needed to keep from rounding up into the wind. Possibly, having a rudder well forward of the mast would change that, which makes me think that it is also the immediacy of failure that makes it difficult to learn.

Anyway, if it were a useful skill, I think learning how to handle reversing handle bars could be made faster with two changes. A longer, more forward front wheel fork, would make the amount of force more apparent to the rider. Second, much larger wheels would be slower to react with failure, so the rider gets a few extra fractions of a second to learn how to react.


All of the people doing the "10 foot challenge" are looking down at the ground. Looking down at the ground in front of your bicycle (or motorcycle, or any two wheel vehicle) results in a ton of shaking and instability in the handlebars. They're making the challenge about 100x harder for themselves.

I would have taken this guy's $200 by simply lining the bike up, keeping my eyes on the horizon, and giving the pedal one solid enough push. I would probably give it back too since I violated the spirit of the challenge. :-)

Interesting video. It's funny how countersteering is a seemingly innate ability, but if you explain it to people they will deny that is how a bicycle works.


You probably would have still failed. Balancing still requires handlebar movement even if you only press on the pedal once.


You could easily go ten feet without any arm movement assuming you lined yourself up ahead of time and didn't look down at the ground. One solid push with arms locked would suffice.


Only if you're an adult! :)


That's an awesome video! Slightly worried about his son though :)


This video is amazing.


So much in so few time.

ps: just remembered that we had a lazy day in primary school where teachers brought asymetric bikes of all kinds (oval wheels, tilted, etc). No inverted direction though.

pps: how long would it take to learn new patterns with training wheels ?


Probably longer. Might be less frustrating for some people, though.


I'm not sure, it seems to me that the difficulty in learning the inverted bike is that the 'experiment' has a very very high threshold. If you deviate you fall, no time for data acquisition. With training wheels you can sense that moment where you fail and start to fall but without stopping.


Yes, you'll be able to spend more time on the bike. The important part of the space of variables is probably not where the training wheels put you.

To bring some (anec-)data into the discussion: I've learned unicycling and seen people learn it. The learners who jump right into it and try again and again to just ride seem to be learning faster than the learner's sliding along walls and holding helpers' hands.


I often do feel that way about especially thorough material, but this just says "it's that way because it's always been that way"


I was more impressed with the tracing through and commentary of individual commits from the present day through the various BSD incarnations and all the way back to 1979: Not the answer as such, but the explanation of.



Per Rob Pike, the very existence of "hidden" named dotfiles was a bug that snowballed: https://plus.google.com/+RobPikeTheHuman/posts/R58WgWwN9jp


That's interesting because in playing with 9Front (Plan9) yesterday, I noticed that rc's ls doesn't ignore dotfiles. I guess they fixed it there.


Damn!


This is certainly interesting. Too bad it doesn't suffer from the same robustness the stackoverflow link had.

I for one get frustrated at work, using git on windows, when I try to create a .gitignore file or something of the sort and windows bitches at me saying "You must type a file name". At least there are easy workarounds for it, but explorer is just retarded.


I know it's difficult, but you should start using more descriptive words instead of 'retarded'. I personally don't care, but a lot of people end up holding it against us retarded-sayers.


Yeah from time to time it's hard to remember how much harsher HN is with comments compared to reddit.


Code archaeology needs to become an actual academic discipline.


Why can no one read a man page anymore? They even have them on the internet these days.

https://developer.apple.com/library/mac/documentation/Darwin...

-A List all entries except for . and ... Always set for the super-user.


That doesn't really explain the history of why. I think that's the most interesting part of the answer.


For security reasons. Nothing should be hidden from root.


It's interesting to me the contrast between what the question of "why" means to different people. The answer on Superuser is wonderfully well researched, and very complete, but does it really answer the question? I guess it depends on your perspective.

Imagine you are in standing in a bedroom, and someone asks you, "Why are you in this bedroom?"

Does you answer look like this?

"I walked in through the front door, passed through the living room, down the hall, then used the door to enter this room."

Or like this?

"I was feeling kind of sleepy, so I figured I'd come in here and lie down on the bed."

The former is not a perfect analogue for the Superuser answer, but perfect analogues are difficult to come by.


That was my thought too. It answered how and when, not why.


If the why was ever recorded anywhere, it would have been in the comments of the code when it was committed, because it wasn't explained in the documentation or anywhere else other than: "it does this". Either that or a email/USENET discussion from that time period; but those aren't so easily retrieved unless you were originally involved in that ancient discussion.

It's worth the effort to document going to the source to see if any insights code be unearthed, even if it doesn't reveal much, just so that others know what has already been explored and to look/ask elsewhere if this is not a sufficient background.

I think the logic to the why has been lost to time.

We might talk about why it would or wouldn't be a good idea for a modern version of ls; it's something to give a few moments' thought, but no more.


It does do the 'why', in a way. Why does the OSX ls do -foo-? Well, because the source OS did it that way. It wasn't a decision by the OSX people, but inherited.



root ls always shows dotfiles on BSD


Not, as the top scoring answer shows, in November 1977. Mundane question, interesting answer.


AFAIK, this is standard on any Unix platform, not just OS X. I also fail to see why this is news, this behaviour is decades old.


> AFAIK, this is standard on any Unix platform, not just OS X.

This is incorrect, and the linked question actually mentions this…

> This differs from what ls on Linux (the one coming from coreutils) does.

> I also fail to see why this is news, this behaviour is decades old.

Straight from the guidelines,

> On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity.

I found it interesting, as the behavior surprises me, and I had no idea BSD ls did this.


> This is incorrect, and the linked question actually mentions this…

Actually it mentions how this comes from BSD, which is a direct descendant of Unix.

> This differs from what ls on Linux (the one coming from coreutils) does.

Linux is not Unix.

> Anything that good hackers would find interesting.

It's amusing that the default behaviour of ls would be interesting to hackings.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: