<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alan's blog &#187; UNIX</title>
	<atom:link href="http://www.alandix.com/blog/tag/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alandix.com/blog</link>
	<description>just starting ...</description>
	<lastBuildDate>Wed, 08 Feb 2012 18:53:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>making life easier &#8211; quick filing in visible folders</title>
		<link>http://www.alandix.com/blog/2009/01/11/making-life-easier-quick-filing-in-visible-folders/</link>
		<comments>http://www.alandix.com/blog/2009/01/11/making-life-easier-quick-filing-in-visible-folders/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 09:35:15 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[academic]]></category>
		<category><![CDATA[HCI and usability]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[HCI]]></category>
		<category><![CDATA[human computer interaction]]></category>
		<category><![CDATA[linked data]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[talis]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[windowing systems]]></category>

		<guid isPermaLink="false">http://www.alandix.com/blog/?p=116</guid>
		<description><![CDATA[It is one of those things that has bugged me for years &#8230; and if it was right I would probably not even notice it was there &#8211; such is the nature of good design, but &#8230;  when I am saving a file from an application and I already have a folder window open, why [...]]]></description>
			<content:encoded><![CDATA[<p>It is one of those things that has bugged me for years &#8230; and if it was right I would probably not even notice it was there &#8211; such is the nature of good design, but &#8230;  when I am saving a file from an application and I already have a folder window open, why is it not easier to select the open folder as the destination.</p>
<p>A scenario: I have just been writing a reference for a student and have a folder for the references open on my desktop. I select &#8220;Save As &#8230;&#8221; from the Word menu and get a file selection dialogue, but I have to navigate through my hard disk to find the folder <em>even though I can see it right in front of me</em> (and I have over 11000 folders, so it does get annoying).</p>
<p>The solution to this is easy, some sort of virtual folder at the top level of the file tree labelled &#8220;Open Folders &#8230;&#8221; that contains a list of the curently open folder windows in the finder.  Indeed for years I instinctively clicked on the &#8216;Desktop&#8217; folder expecting this to contain the open windows, but of course this just refers to the various aliases and files permamently on the desktop background, not the open windows I can see in front of me.</p>
<p>In fact as Mac OSX is built on top of UNIX there is an easy very UNIX-ish fix (or maybe hack), the Finder could simply maintain an actual folder (probably on the desktop) called &#8220;Finder Folders&#8221; and add aliases to folders as you navigate.  Although less in the spirit of Windows, this would certainly be possible there too and of course any of the LINUX based systems.  &#8230; so OS developers out there &#8220;fix it&#8221;, it is easy.</p>
<p>So why is it that this is a persistent and annoying problem <em>and</em> has an easy fix, and yet is still there in every system I have used after 30 years of windowing systems?</p>
<p>First, it is annoying and persistent, but does not stop you getting things done, it is about efficiency but not a &#8216;bug&#8217; &#8230; and system designers love to say, &#8220;but it can do X&#8221;, and then send flying fingers over the keyboard to show you just how.  So it gets overshadowed by bigger issues and never appears in bug lists &#8211; and even though it has annoyed me for years, no, I have never sent a bug report to Apple either.</p>
<p>Second it is only a problem when you have sufficient files.  This means it is unlikely to be encountered during normal user testing.  There are a class of problems like this and &#8216;expert slips&#8217;<sup><a href="#footnote-1-116" id="footnote-link-1-116" title="See the footnote.">1</a></sup>, that require very long term use before they become apparent.  Rigorous user testing is not sufficient to produse usable systems. To be fair many people have a relatively small number of files and folders (often just one enormous &#8220;My Documents&#8221; folder!), but at a time when PCs ship with hundreds of giga-bytes of disk it does seem slighty odd that so much software fails either in terms of user interface (as in this case) or in terms of functionality (Spotlight is seriously challenged by my disk) when you actually <em>use</em> the space!</p>
<p>Finally, and I think the real reason, is in the implementation architecture.  For all sorts of good software engineering reasons, the  functional separation between applications is very strong.  Typically the only way they &#8216;talk&#8217; is through cut-and-paste or drag-and-drop, with occasional scripting for real experts. In most windowing environments the &#8216;application&#8217; that lets you navigate files (Finder on the Mac, File Explorer in Windows) is just another application like all the rest.  From a system point of view, the file selection dialogue is part of the lower level toolkit and has no link to the particular application called &#8216;Finder&#8217;.  However, to me as a user, the Finder is special; it appears to me (and I am sure most) as &#8216;the computer&#8217; and certainly part of the &#8216;desktop&#8217;.  Implementation architecture has a major interface effect.</p>
<p>But even if the Finder is &#8216;just another application&#8217;, the same holds for all applications.  As a user I see them all and if I have selected a font in one application why is it not easier to select the same font in another?  In the semantic web world there is an increasing move towards open data / linked data / web of data<sup><a href="#footnote-2-116" id="footnote-link-2-116" title="See the footnote.">2</a></sup>, all about moving data out of application silos.  However, this usually refers to persistent data more like the file system of the PC &#8230; which actually is shared, at least physically, between applications; what is also needed is that some of the ephemeral state of interaction is also shared on a moment-to-moment basis.</p>
<p>Maybe this will emerge anyway with increasing numbers of micro-applications such as widgets &#8230; although if anything they often sit in silos as much as larger applications, just smaller silos.  In fact, I think the opposite is true, micro-applications and desktop mash-ups require us to understand better and develop just these ways to allow applications to &#8216;open up&#8217;, so that they can see what the user sees.</p>
<br /><ol class="footnotes"><li id="footnote-1-116">see &#8220;<a href="http://www.hcibook.com/alan/papers/buttons94/" target="_blank">Causing Trouble with Buttons</a>&#8221; for how <a href="http://www.dcs.gla.ac.uk/~stephen/" target="_blank">Steve Brewster</a> and I once forced infrequent expert slips to happen often enough to be user testable  [<a href="#footnote-link-1-116">back</a>]</li><li id="footnote-2-116">For example the <a href="http://www.webofdata.info/" target="_blank">Web of Data Practitioners Days</a> I <a href="http://www.alandix.com/blog/2008/10/23/web-of-data-practioners-days/" target="_blank">blogged about</a> a couple of months back and the core vision of <a href="http://www.talis.com/platform/" target="_blank">Talis Platform</a> that I&#8217;m on the advisory board of.  [<a href="#footnote-link-2-116">back</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.alandix.com/blog/2009/01/11/making-life-easier-quick-filing-in-visible-folders/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>When is an empty directory, not an empty directory?</title>
		<link>http://www.alandix.com/blog/2007/12/14/when-is-an-empty-directory-not-an-empty-directory/</link>
		<comments>http://www.alandix.com/blog/2007/12/14/when-is-an-empty-directory-not-an-empty-directory/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 07:20:59 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[academic]]></category>
		<category><![CDATA[garbage collection]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://www.alandix.com/blog/2007/12/14/when-is-an-empty-directory-not-an-empty-directory/</guid>
		<description><![CDATA[For all you UNIX hackers out there &#8230; a conundrum: % ls -l tmp total 4 -rw------- 1 user group 1363 Feb 4 2003 getchap-times % du -k tmp 1914 tmp Last night I was trying to move copy a directory structure between machines. It failed, for some reason, I guess permissions somewhere, so I [...]]]></description>
			<content:encoded><![CDATA[<p>For all you UNIX hackers out there &#8230; a conundrum:</p>
<blockquote><p><code>% ls -l tmp <br />
total 4 <br />
-rw-------   1 user group          1363 Feb  4  2003 getchap-times <br />
% du -k tmp <br />
1914    tmp</code></p></blockquote>
<p><span id="more-48"></span>Last night I was trying to move copy a directory structure between machines.  It failed, for some reason, I guess permissions somewhere, so I tried to clean out some directories with large numbers of &#8216;temporary&#8217; files that hadn&#8217;t got deleted.  There were a couple of directories like this and it is not trivial selectively deleting files from very full directories as something like &#8216;<code>rm search*.out'</code> fails if there are too many files matching &#8216;<code>search*.out</code>&#8216;<sup><a href="#footnote-1-48" id="footnote-link-1-48" title="See the footnote.">1</a></sup>.  I know I could have written a quick C program, but life is short and so after many partial match commands of the form &#8216;<code>rm search23*.out</code>&#8216; I started to get there.</p>
<p>Then I turned to a second directory, which seemed to be  biggy.  However it turned out to have just a dozen files in it.  I deleted all but one and assumed it was enormous, but &#8216;<code>ls -l</code>&#8216; got:</p>
<blockquote><p><code>% ls -l tmp<br />
total 4<br />
-rw-------   1 user group          1363 Feb  4  2003 getchap-times</code></p></blockquote>
<p>Just 1363 bytes? I thought I must have been mistaken when I&#8217;d thought the directory was full, so checked <code>du</code> again:</p>
<blockquote><p><code>% du -k tmp<br />
1914    tmp</code></p></blockquote>
<p>&#8220;Ah!, I thought, &#8220;hidden files&#8221;, so a quick &#8216;<code>ls -l</code>&#8216;</p>
<blockquote><p><code>% ls -la tmp<br />
total 3832<br />
drwxrwxrwx   2 user group       1942016 Dec 14 06:37 .<br />
drwxr-xr-x   5 user group          1536 Apr 22  2006 ..<br />
-rw-------   1 user group          1363 Feb  4  2003 getchap-times</code></p></blockquote>
<p>No hidden files &#8230; but boy look at &#8216;.&#8217;. The directory itself is the biggy.  The directory contains one file of 1.3K, but is itself 1.9 meg big!</p>
<p>Several years ago (i.e. since when there will have been reboots, file checks, etc.) the directory had loads of small files in it that I deleted (using the same laborious method I had done in the other directory last night). In order to have so many files the directory itself will have to have stored an entry for each &#8211; leading to its whopping 1.9 meg size (there were a LOT of little files, UNIX is good at being scalable).  &#8230; but when the files are deleted, UNIX does not reclaim this space.</p>
<p>I guess whoever coded the  &#8216;<code>unlink</code>&#8216;  system call never thought about the possibility that directories would get so big and so didn&#8217;t try to reclaim the space and there is no &#8216;garbage collection&#8217; on the file system.</p>
<p>This was on SunOS 5.8 &#8211; is this the same on other versions of UNIX &#8211; LINUX?</p>
<p>So next time you are wondering where all your space has gone &#8230; maybe it is in those empty directories. :-/</p>
<br /><ol class="footnotes"><li id="footnote-1-48">the &#8216;<code>search*.out</code>&#8216; is of course expanded by the shell into a very very big command line!  [<a href="#footnote-link-1-48">back</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.alandix.com/blog/2007/12/14/when-is-an-empty-directory-not-an-empty-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

