Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment /tmp and /var/tmp (Score 5, Interesting) 303

There's a lot of little things you'll notice over the years about Solaris / OpenSolaris that are unique, cool, neat, or useful -- too many to list in an article like this, of course. One example I was reminded of by the "differences" table -- the authors note that the Solaris equivalent of Linux's "/tmp" is "/var/tmp" -- but they failed to point out that Solaris also has a /tmp, and that, by default /tmp is actually partially backed by RAM, which is extremely convenient and useful from time to time, when you want a little piece of lightning-fast filesystem space, or want to eliminate disk as a variable in some sort of timing test. Of course, linux also has ramdisks, but this is generally far more convenient.

$ time dd if=/dev/zero of=/var/tmp/foo bs=1024k count=128
128+0 records in
128+0 records out
dd if=/dev/zero of=/var/tmp/foo bs=1024k count=128 0.00s user 0.71s system 24% cpu 2.910 total

$ time dd if=/dev/zero of=/tmp/foo bs=1024k count=128
128+0 records in
128+0 records out
dd if=/dev/zero of=/tmp/foo bs=1024k count=128 0.00s user 0.43s system 98% cpu 0.438 total

Slashdot Top Deals

Never test for an error condition you don't know how to handle. -- Steinbach

Working...