
On OS X, why does sudo ls show hidden (dot) files? - Zirro
https://superuser.com/questions/931554/on-os-x-why-does-sudo-ls-show-hidden-dot-files
======
darkr
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.

~~~
DougBTX
That takes about eight months of practice apparently.

[https://m.youtube.com/watch?v=MFzDaBzBlL0](https://m.youtube.com/watch?v=MFzDaBzBlL0)

~~~
brobinson
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.

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

~~~
brobinson
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.

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

~~~
tehaugmenter
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.

~~~
droopyEyelids
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.

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

------
azernik
Code archaeology needs to become an actual academic discipline.

------
trippy_biscuits
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...](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/ls.1.html)

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

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

------
segmondy
For security reasons. Nothing should be hidden from root.

~~~
bradleyland
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.

~~~
abrowne
That was my thought too. It answered _how_ and _when_ , not _why_.

~~~
fl0wenol
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.

------
kazinator
Also here: [http://unix.stackexchange.com/questions/211689/sudo-ls-
not-s...](http://unix.stackexchange.com/questions/211689/sudo-ls-not-showing-
hidden-files-on-linux/211701#211701)

------
bksta
root ls always shows dotfiles on BSD

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

------
hobarrera
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.

~~~
deathanatos
> 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.

~~~
hobarrera
> 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.

