A sparse file is a file which does not take more space on disk than needed. Such a file is usually used to store a partition image on disk, for instance with a virtualization solution like Xen.
It’s super easy, to know if a file is sparse or not. Just use the ’s’ option of ls.
Where the first size column is the effective space taken on disk while the second size column is the max space of that file. We see that dompat.data is sparse, since its max size is 24 GB while it takes only 12 GB on disk.
References
More information on command which can handle sparse files in this article
Check out my new mix in the sound section! I did something a bit different than the previous time, as I wanted to explore the electro-rock style, which is really a great and energetic combination.
Extrabright Mix 02: From electro-rock to minimal, with an electronica introduction and a new age epilogue. Calvin Harris remixed by Mr. Oizo, Ellen Alien, Justice, Miss Kittin, Love Motel and a couple of other great tracks.
Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.
I like particularly the TED talks. They are creative, expose innovative ideas in the fields of science, art, education, technology, design and even spirituality. It is a great source of inspiration. Now with leopard I can also watch my TED podcasts on TV using the new frontrow application. This is awesome.
In The following talk, Ken Robinson talks about creativity and education in “Do schools today kill creativity?”.
In the last past weeks I had a busy time finishing an Eclipse/SWT project, therefore having less time to post news on this blog. It should be better for the coming weeks.
We arrived yesterday in Madrid, back from a short week in Extremadura. It was a nice journey. We visited some other nice pueblos. Caceres about 80 km North of Don Benito, where we saw nice roman and arab ruins, in particular a few towers around the antique city along with walls protecting against invaders. Caceres shows a nice mix between the original roman style and arab constructions. We went also to Guadalupe, a village in the mountain at 1.5 hour driving North East from Don Benito. There we visited an old monastery, where lots of antique christian objects in the purest Spanish and baroque tradition have been conserved. We did finally a short stop on Thursday in Medellin, that I mentioned already in my last post. There we saw of course a statue of Hernan Cortes. I am wondering if this guy is worth admiring, considering what has been done by the spanish conquistadors in South America, where the native peoples were persecuted, their culture and language largely cannibilized by the spanish invaders.
Spending some holidays in Spain at the moment. We arrived on Saturday in Madrid and then went to Don Benito on Sunday. It is a small town at 3.5 hours driving from Madrid, in Extremadura, a state in the center of Spain bording Portugal. Very nice. The area has lots of antique roman buildings to visit. We were yesterday in Merida, about 60 km away from Don Benito, where we visited lots roman ruins like a stadium, a theatre, various houses and roman roads, as well as an incredible roman bridge that is still in use today and is a couple of hundreds meter long! Definitely worth visiting.
It’s funny, because around here there are lots of villages or small town with well known names. A village beside Don Benito is named Medellin. There are just a couple of thousands people living there. But it is also the home village of the spanish conquistador Hernan Cortes, so no wonder that there is a city in South America, in Colombia, with that name. Merida, is also a name found in Equator and some other place around the world. Although I am not sure why.
Ok, I have another brain-teaser for you guys. Please don’t post the answer in the comments, so the one arriving afterwards can guess as well. You can drop me a line to check if your answer is right (pajai at extrabright dot com).
A prisoner is escaping from jail. At some point on his path, he is arriving at a crossing. He can take either the road to the left or the one to the right. One will lead him to freedom while the other back to jail. He does not know which one. On each side of the road, there is a guy waiting. The prisoner knows that one of them is honest while the other is not. The prisoner is allowed to ask just one question to one of them, in order to find his way. What is the right question to ask?
I have always found the integration of X11 apps in Mac OS X quite alright, apart from the fact that for a native Mac application you use the apple key for keyboard shortcut and for an X11 app you use the control key. So, for instance, if you want to copy and cut a text between, let’s say, Firefox (native) and OpenOffice (X11), you need to remember to use apple+c in Firefox and ctrl+v in OpenOffice. Needless to say it is a hassle and it makes the interoperability between native and X11 applications quite useless (did I mention I bought M$ Office on Mac for this very reason?).
A first solution to solve that problem would be to switch the mapping between the ctrl and apple key inside X11, for instance using the tool xmodmap. But then we would have the disadvantage that we would need to use the apple key instead of ctrl in every situation, e.g. including within command line tools in xterm (the X11 terminal). Then, when using the command line text editor nano within xterm, we would need to press apple+o to save a text and apple+x to exit, while for nano within the non-X11 terminal, we would need to use the control key instead. So this solution appears to me as unideal.
In fact, as I am not using the meta key in X11, which is originally at the place of the apple key, I can just assign the control key to the apple key and get rid of the meta. This would ensure that I can go on using the apple key for keyboard shortcuts inside X11 — e.g. apple + c in OpenOffice — while keeping the mapping of the control key for use with command line tools.
This modification is pretty straightforward. Just create a .Xmodmap file inside your home folder with the following lines (or extend it accordingly if it already exists):
! ~/.Xmodmap
clear Mod2
clear control
keycode 63 = Control_L
keycode 67 = Control_L
add control = Control_L
In fact, what we do here is first to clear the two logical keys corresponding to meta and control, assign Control_L to the two key we want, and recreate uniquely the control logical key. When restarting X11, your new mapping will be automatically activated. You can test it using xev or xmodmap -p.
Recent Comments