Quick Linux tree view of directory contents
I’m working on the Fabric documentation a bit and wanted to make a quick checklist of all of the files in the “old-doc” directory so I could check’em off as I moved them into their new home.
Quick Google search for:
unix command line tree view of directory contents
Got me to this page where I found this gem:
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
Unfortunately, it also includes the contents of the “.git” subdirectory which is less than useful.
Rather than frig around with “ls“ globulation, I decided to do a quick search. I cannot be the first person to need this particular result..
I hunted around for a few minutes and came upon this:
Downloaded and unzipped, modified the makefile to comment out the Linux defaults and uncommented the OS X configuration.
Then a quick:
# make
# sudo cp tree /usr/local/bin
Now:
# tree old-docs
Gives this:
/.../fabric/old-doc/
|-- samples
| |-- depends
| | `-- fabfile.py
| |-- fabfile.example
| |-- roles
| | `-- fabfile.py
| |-- simple
| | `-- fabfile.py
| |-- transitives
| | `-- fabfile.py
| `-- variables
| `-- fabfile.py
`-- site
|-- api.py
|-- bin
| |-- generate.py
| |-- markdown2.py
| |-- textile.py
| `-- toc.py
|-- common.css
|-- community.md
|-- documentation.md
|-- download.txt
|-- fabric-logo.svg
|-- hacking.md
|-- index.md
|-- other-files
|-- print.css
|-- programmers_guide.txt
|-- screen.css
|-- source.txt
|-- template.html
`-- user_guide.md
Perfect!
Squaring the circle
Heard on NPR 2009-05-07 in an unknown context.
Squaring the circle is a problem proposed by ancient geometers. It is the challenge of constructing a square with the same area as a given circle by using only a finite number of steps with compass and straightedge. More abstractly and more precisely, it may be taken to ask whether specified axioms of Euclidean geometry concerning the existence of lines and circles entail the existence of such a square.
In 1882, the task was proven to be impossible, as a consequence of the Lindemann–Weierstrass theorem which proves that pi (π) is a transcendental, rather than an algebraic irrational number; that is, it is not the root of any polynomial with rational coefficients. It had been known for some decades before then that if π were transcendental then the construction would be impossible, but that π is transcendental was not proven until 1882. Approximate squaring to any given non-perfect accuracy, on the other hand, is possible in a finite number of steps, as a consequence of the fact that there are rational numbers arbitrarily close to π. The expression “squaring the circle” is sometimes used as a metaphor doing something logically or intuitively impossible.