There is a better “method of last resort” than the one mentioned in Kyle Rankin's excellent article in the March 2009 issue titled, “When Disaster Strikes: Hard Drive Crashes”.
If you can't mount a ddrescue image, but need to retrieve documents, photographs, PDF files and so on, you can use a nifty program called foremost. It is available for most *nix platforms, and on Windoze via cygwin. foremost scans through a hard drive image, mountable or not, and looks for recognizable file headers. It understands more than 20 popular file headers, including jpg, pdf, doc, xml and so on. When it finds these files, it dumps them out as usable files. It is truly a thing of beauty. The first time you use it, you will just sit back in amazement. For example, if you have a hard drive image named my_hd_image.dd that was made with one of the dd utilities, you could execute the following command:
~$ foremost -t all -i my_hd_image.dd
After the command executes, a subdirectory will be created that has all of the recovered files, organized neatly by file type. On Ubuntu, you can get foremost by typing:
~$ sudo apt-get install foremost
This tool is also excellent for recovering deleted files from USB drives
and more. Enjoy! Love your magazine!
Wow, great tip. Thanks!—Ed.
I wanted to put in another plug for all the authors of LJ and say that you guys and gals do a bang-up job. I recently renewed my subscription, not for one but two years. It is the highlight of my month to find it in the mailbox.
Compliments aside, I have a neat suggestion. I have been scanning forums, journals and search engines for a way to utilize a laptop as a more-or-less standalone DVD player for our vehicle. I know that the logical thing to do would be to use the laptop as a laptop, but I am wanting to get a little more “geeky” and see if I could ceiling-mount something like a 12" unit, link it into the car stereo system through an auxiliary channel and use it as a media server—and even get a wireless mouse/keyboard to “pimp up my ride” a little bit. The thing is, I would like it to be easy to use for my seven- and/or five-year-old and non-techy spouse.
Thanks again to all contributors. I appreciate your knowledge and
Thanks for the compliments. Regarding your car-puter, um, AWESOME! That's a cool project if I've ever heard one. It might be worth investing in touchscreen technology and something like XBMC. Your kids would be able to manage things by tapping. (And, my wife just made it very clear to ME that I'm not allowed to try such a thing with our minivan, so you'll have to keep us posted.)—Ed.
Regarding the LJ Web article “What's the
Tweeting Protocol?” by Doc Searls
is LJ ever going to create a social blog for
Linux users to come together and work on rallying up new users and
clients for Linux as a better and more adaptable OS?
Love the mag and its articles.
We always are interested in how best to take over the world. Unfortunately, we still haven't figured out the secret sauce for making it take off. Please don't hesitate to drop us suggestions; we're always open to ideas.—Ed.
I work for an agency of the California State government. Our agency is going open source as much as possible. Our programmers even slap the GPL on everything they make at work. We have Linux servers and use MySQL, Apache and nginx, among other open-source applications. There's really only one major hurdle stopping us from putting Linux on the desktop: specialized applications. For example, there's an application that allows a judge to click on case characteristics, and the app then spits out everything the judge is supposed to tell the jury before the trial begins. The laws that govern what judges are supposed to tell juries change quarterly; therefore, we receive quarterly updates.
Unfortunately, like many of our other specialized applications, it doesn't work on Wine. There are no open-source or even commercial Linux programs that do the same thing.
I've thought of virtual machines, but that still requires us to purchase Windows licenses, as would dual-booting or terminal services/Citrix.
I am hoping that as Linux advocates and experts, you could suggest a
strategy that would allow Linux on the desktop at our organization given
I deal with this every day working at a school district. You're absolutely correct that a few proprietary applications are tough to deal with. So far, the best way I've managed to handle it is with a single Windows terminal server accessed remotely via rdesktop. You don't need to pay for the CAL for the Linux machine, but you still do need to pay for the server and TSCALs. I think, ultimately, the best hope will be as programmers continue to move their applications to Web-based alternatives. I think that will truly level the playing field on the desktop.
Thanks again for the question, and although I'm not much help, perhaps misery loves company.—Ed.
In James Gray's “Go Green, Save Green with Linux” article in
the April 2008 issue, and again in a
response to that article in the April 2009 Letters section titled
continue to be misled into believing that carbon dioxide is a deadly
poison. This is irresponsible journalism, or journalism without research to
back up the statements. Carbon dioxide is, in fact, an essential ingredient
to life on this planet. It produces oxygen that we breathe through a process
called photosynthesis, and without carbon dioxide, we would suffocate.
Additionally, the whole “carbon footprint” scam is simply a fraud designed
by fear-mongers whose aim is to introduce a “carbon tax” against your
“carbon footprint”; it's all the same scam as the global
warming myth, and it's
simply political fear mongering. If you research it, the carbon dioxide
output from humans is miniscule compared to the carbon dioxide output from
the earth itself. For us to believe that we are having an impact on global
temperatures via our carbon dioxide output is absolutely absurd. Please,
LJ, let's all stop perpetuating these myths. Don't get
me wrong; I'm all
for conservation of energy and all the benefits from that, but let's get
our facts straight. Thanks.
James Gray replies: Thanks for writing. You are completely correct that carbon dioxide is essential to life on Earth. For the record, nowhere did I say that it is a deadly poison. However, I do contend that an imbalance of carbon dioxide in the atmosphere appears to have an effect on our global climate patterns. On one level, it is simple physics. Carbon dioxide is one of many greenhouse gases that trap heat in the lower atmosphere, enabling life to exist. Logically, if more carbon dioxide exists in the atmosphere—and we are filling it with around 30 gigatons of a gas every year—more heat will be trapped. However, this is not something I pulled out of a hat. It is called the Theory of Global Climate Change. To learn about the theory, I have read documents, such as the “Climate Change 2007: Synthesis Report” from the Intergovernmental Panel on Climate Change (IPCC). The IPCC, which recently won the Nobel Peace Prize for its work, summarizes the scientific findings of climatologists around the world. This report states: “Warming of the climate system is unequivocal, as is now evident from observations of increases in global air and ocean temperatures, widespread melting of snow, ice and rising average sea level.” Regarding causes, the report says: “Global GHG [greenhouse gas] emissions due to human activities have grown since pre-industrial times, with an increase of 70% between 1970 and 2004....Most of the observed increase in global average temperatures since the mid-20th century is very likely due to the observed increase in anthropogenic [that is, human-caused] GHG concentrations.” Read the full document at www.ipcc.ch/pdf/assessment-report/ar4/syr/ar4_syr_spm.pdf.
I'm curious how you've determined that a scientific theory—one supported by huge amounts of empirical data and having near unanimous consensus among climatologists—is a “myth”. Are you a climatologist who has collected his own data? Do you reject other scientific theories, such as plate tectonics, the Big Bang or relativity? Or do you just reject those that are inconvenient to you?
I periodically write about the Theory of Global Climate Change because I care about the planet I will leave to my descendants, and I am fascinated by the wonders of nature. I also will stridently advocate for a carbon tax, because such tools are the only effective way to change human behavior. I think that if you do your homework, you will find yourself on the same team—the one that is informed by today's best science and advocates for prevention today in order to avoid a future climate catastrophe.
I have been watching your videos on YouTube for quite some
time now, and I have become so interested in Linux, I have installed it on my
PS3. (I know you're thinking, how can you be poor if you own a PS3? Well, the
answer for that is my friend sold me his for $30, because he got a 360.)
Anyway, I have sent you an e-mail because I really would like to get a fully
functional Ubuntu Linux computer of some sort. I was wondering if you could
send me one of your test laptops that you receive? My parents tell me that
I should get a job to earn the money for one, but sadly, I am not old enough for a
job, so I became desperate and have turned to you. I don't expect to
be e-mailed back, but it would make my day if you would reply.
Sadly, we don't get to keep most of the products we review. That said, if a fully functional Linux machine is really something you want, it might be worth checking with the local schools or government buildings. Often, last year's models are either given away or sold for very good prices. If you draft a convincing letter to the right administrator at a local school district, you might be surprised with the response you get. Good luck!—Ed.
Today I got a letter saying that Dr. Dobbs, the other magazine I'm
subscribed to, ceased as a standalone monthly magazine. I hope you're not
planning to do the same. LJ is the main/only source of
information I have on Linux, and I certainly would miss not receiving it
anymore. Keep up the good work!
We certainly don't plan to go anywhere! If you now have more in your subscription budget, perhaps you could get a subscription to Linux Journal for someone else. (Shameless plug?) Also, don't forget to stop by our Web site. We have tons of additional content there as well.—Ed.
I'm right behind Fritz Mehner's desire [see the March 2009 Letters section] to make scripting more elegant and efficient wherever possible.
Fritz's letter drew my attention to a problem with the example for loop at the end of the Tech Tip referred to by him (LJ, December 2008, page 56), which needs the opposite treatment if scripted to avoid potential disaster. The problem is the “globbed” for statement, which will fail if the total length of matching filenames causes the expanded command line to exceed the shell's command-line buffer. Although that buffer is very large, it is finite (of the order of 10,000 bytes usually), and I've fixed more than one production script that had failed due to this defect.
The solution is to replace the first line of the loop:
for file in *; do data_source $file | ... done
with one that uses the find utility to avoid shell expansion, as in the replacement loop below:
find . -maxdepth 1 -type f -print | while read file; do data_source $file | ... done
I hope this helps someone avoid that otherwise inevitable call in the
middle of the night.
In the Linux world, many things have been changing during the past few years. The boom that had started with Knoppix, a live CD that was easy to use and made it possible to learn about Linux and use it without being an expert, changed everything. Now there are hundreds of distributions, many of which can be used as live CDs. But, it became difficult to have a clear overview of all of them. Many are good, and some are specialized, such as GoboLinux (KDE, de/engl/mag/port). In GoboLinux, you don't need a package database, because the filesystem is the database; each program resides in its own directory. There's also OpenGEU (Enlightenment, Italian/English), openmamba (KDE, Italian/English, good for beginners), Puppy (JWM, manual, English, small, quick, easy to use, good on old and new hardware), SAM (Xfce, multilingual), SliTaz (JWM, English/French, extra small) and so on.
It's fascinating what can be offered by mini-distributions—they're fast, easy to install and extremely quick. DSL is well known in the Linux world, but there are more, such as Puppy, Feather, Slax and, last but not least, SliTaz, the smallest distribution I know of at the moment that includes programs like an Internet browser.
I think it would be a great idea to publish the strength of live CDs and
show the developments, especially with the very small distributions that do
a great job, and demonstrate that there are not only alternatives to Windows
but also alternatives to the big ones like Sabayon, Mandriva, Ubuntu and
Unfortunately, as Linux users, one of our biggest strengths is also one of our biggest weaknesses. As you've outlined, “Linux” for the end user doesn't come close to describing the desktop experience. We do try to cover a wide variety of distributions, but there are so many options, it's hard to cover everything equally. Be sure to check out our Web site as well (www.linuxjournal.com). It's another way to spread the attention around a bit.—Ed.
Have a photo you'd like to share with LJ readers? Send your submission to email@example.com. If we run yours in the magazine, we'll send you a free T-shirt.
- One Port to Rule Them All!
- Privacy Is Personal
- PHP for Non-Developers
- Secure Server Deployments in Hostile Territory
- Linux Kernel 4.1 Released
- Django Templates
- July 2015 Issue of Linux Journal: Mobile
- A Code Boot Camp for Underprivileged Kids
- Practical Books for the Most Technical People on the Planet
- Attack of the Drones