Letters to the Editor
Hi! First off, thanks for Linux Journal. I have a comment about a particular command in the article “Linux Tips: How to move /home to a new hard drive on your Linux system” in December's issue.
cp -r /home/* /mnt
as suggested to copy the home directory does not copy symbolic or hard links correctly. (I am not sure about the other command suggested for I don't have cpio on my system.) If the user has many links, she will find that the “copy” in /mnt takes up more disk space. The following command will copy links correctly:
(cd /home ; tar cf - .) | (cd /mnt ; tar xvf -)
Cheers,Delman Lee firstname.lastname@example.org
We had the same problem in an earlier article, and the same (correct) response. I never use cp -r myself, and for some reason or other did not catch this mistake. Thanks for the note.
The control port which corresponds with printer data port 0x378 is 0x37a, and not 0x380, as described in Kernel Korner, December issue (#8). Why is it required that the example user space printer driver be compiled with optimization turned on? And what level opt?David Morris email@example.com
You are absolutely right; I must have been writing too late at night. Fortunately, this mistake was not propagated into the userlp.c code that was included in the article; there, I let the computer do the arithmetic, so that I couldn't accidentally replace hex arithmetic with decimal arithmetic. The reason I was working in decimal was that I had just been working on the shell script version which I mentioned but didn't include in the article, where I had to do all the arithmetic in decimal. Perhaps that is another good reason not to try to write device drivers as shell scripts.
The reason that the userlp.c program included has to be compiled with optimization (of any level at all) turned on is that all the port I/O functions are defined in the header files as “static inline” functions, a GCC extension is enabled only by turning on optimization. I'm sorry that was not adequately addressed in the article.
Getting Started with DevOps - Including New Data on IT Performance from Puppet Labs 2015 State of DevOps Report
August 27, 2015
12:00 PM CDT
DevOps represents a profound change from the way most IT departments have traditionally worked: from siloed teams and high-anxiety releases to everyone collaborating on uneventful and more frequent releases of higher-quality code. It doesn't matter how large or small an organization is, or even whether it's historically slow moving or risk averse — there are ways to adopt DevOps sanely, and get measurable results in just weeks.
Free to Linux Journal readers.Register Now!
- Hacking a Safe with Bash
- Django Models and Migrations
- Secure Server Deployments in Hostile Territory, Part II
- Huge Package Overhaul for Debian and Ubuntu
- The Controversy Behind Canonical's Intellectual Property Policy
- Home Automation with Raspberry Pi
- Shashlik - a Tasty New Android Simulator
- Embed Linux in Monitoring and Control Systems
- KDE Reveals Plasma Mobile
- diff -u: What's New in Kernel Development