Quickzi: How to determine file types on Linux

Need to find out what all the file types in a certain directory are? Simple!

Execute the following on the command line:

find /path/here/ -type f -print | xargs file

I typed: find /home/adam/test/ -type f -print | xargs file

The output will look something like this:

/home/adam/test/music.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 44100 Hz
/home/adam/test/package.deb: Debian binary package (format 2.0)
/home/adam/test/file.tar.gz: gzip compressed data, from Unix, last modified: Tue Jun 20 12:51:11 2006
/home/adam/test/widget.xml: ASCII text, with CRLF line terminators
/home/adam/test/logfile.txt: empty

Cheers!

Command Line Progress Bar

Have you ever had to copy a fairly large file on the command line and wondered what the progress was? The command line progress bar seems to do a decent job at showing the percentage and estimated time of a copy.

Description from the site:

Bar is a simple tool to copy a stream of data and print a display for the user on stderr showing (a) the amount of data passed, (b) the throughput of the data transfer, and (c) the transfer time, or, if the total size of the data stream is known, the estimated time remaining, what percentage of the data transfer has been completed, and a progress bar.

Bar was originally written for the purpose of estimating the amount of time needed to transfer large amounts (many, many gigabytes) of data across a network. (Usually in an SSH/tar pipe.)

Go check it out!

Quickzi: How to Jail VSFTPD Users

If you’re worried about FTP users exploring outside of their home directory, you want to set up what is called a chroot jail.

To do this, open the /etc/vsftpd.conf file:

vim /etc/vsftpd.conf

and make the following modifications (line should be uncommented):

chroot_local_user=YES

After you save the file, restart vsftpd:

/etc/init.d/vsftpd restart

Now all users will be jailed to their own home directory when using FTP.
Now, lets say you only want to jail certain users, and allow other users to browse other directories. To do this, you’ll want to again edit the configuration file.

vim /etc/vsftpd.conf

uncomment the following lines:

chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list

After you save the file, restart vsftpd:

/etc/init.d/vsftpd restart

Now you will need to create the /etc/vsftpd.chroot_list file and add in users you do NOT want to jail. By default, all users will be jailed. In the /etc/vsftpd.chroot_list file you can specify what users to allow to browse all directories.

ColorMake: A colorful make output

ColorMake is a neat wrapper script written in Perl that generates a colorful make output when compiling an application on the Linux command line. Once installed, basically all you need to do is type “cmake” or “clmake” whenever you would ordinarily type “make”. This is useful for those of us who like to compile from source and want to be able to distinguish between output lines. Go check it out.

Replacing Windows with Linux

There is a great article written by Ashton Mills at APCMag titled SUPERGUIDE: The Open Source Challenge. How to replace Windows completely with Ubuntu.

Ashton essentially delves into the article with the assumption that Windows does everything we need, and explores the possibility of Linux and open source measuring up with a rating system.

When I was first given this task I had to sit and blink a few times, if for nothing else than dramatic pause. I’m a self-confessed Linux nut, as some of you may know, but even I’m cautious to do away with Windows completely. There’s a reason I have a dual-boot Windows and Linux machine. Several of them, in fact.
But have I just been conditioned into using Windows because of past experience, or applications, or file formats, or the myriad other reasons that make Windows a comfort zone because it’s all so familiar?

Check the rest of it out.

Linux Kernel 2.6.23

The Linux Kernel version 2.6.23 was released yesterday, October 9th, 2007 that includes some great improvements.

2.6.23 includes the new, better, fairer CFS process scheduler, a simpler read-ahead mechanism, the lguest ‘Linux-on-Linux’ paravirtualization hypervisor, XEN guest support, KVM smp guest support, variable process argument length, make SLUB the default slab allocator, SELinux protection for exploiting null dereferences using mmap, XFS and ext4 improvements, PPP over L2TP support, the ‘lumpy’ reclaim algorithm, a userspace driver framework, the O_CLOEXEC file descriptor flag, splice improvements, new fallocate() syscall, lock statistics, support for multiqueue network devices, various new drivers and many other minor features and fixes.

Check out the rest of whats new in the Linux Kernel 2.6.23..

50 Open Source Applications

There’s a great article written by Christiana Laun that details 50 open source applications to get your office using Open Source. The article covers Desktop and Server distributions, Email and instant messaging, productivity, imaging and design, content management, web tools, network and server management, finances, and security and tracking.

Though not all of the applications listed are open source, it’s still a decent list and a good read.

Read the full article..

5 Reasons your parents should NOT use Linux

This is a devils advocate post in response to my original post:

5 Reasons your parents should use Linux

Though my original post intended to explain 5 reasons you should switch your parents to Linux, this post will address what many people have commented on in the past few days. 5 reasons why you should NOT switch your parents to Linux. I still stand by my original post in that I feel Mom and Dad running Linux is a better alternative if all they simply do on the computer is everyday tasks such as browse websites, e-mail, word processing, etc. If there are restrictions that tie someone to using Windows, theres no need to switch your parents to Linux.

  1. Applications
  2. Lets face it, there are some parents that insist on using certain applications that are strictly made for Windows and just do not function properly in Wine. Some parents do not want alternatives to Windows applications, they want the same application Uncle Joe uses to manage his bank accounts regardless of the cost.

  3. Look and Feel
  4. There are a good majority of parents out there that will look at the Gnome, KDE, or any other desktop GUI and not accept the “change” of it being different than Windows. It’s a sad but true statement to say that some people just can’t stand change. Sure, there are themes available that can make the desktop window manager look like a Windows desktop, but really, is it worth it?

  5. Usability
  6. What happens when Dad goes to Wal-Mart and buys this cool computer game he saw on sale? He’s not going to be able to simply pop in the CD and install it. The usability of Linux definitely has its restrictions. The biggest one being that Linux is still not completely mainstream enough for you to tell your Dad that if he buys a computer application or game to check the back of the box and ensure that it works on Linux. Even if you did tell him to do that, 98% of the time the boxed product will likely not support Linux.

  7. Support
  8. If you’re not living at home with your parents there may be some things that are just too complex or difficult to support or troubleshoot over the phone. Mom and Dad can’t simply call the neighbor over to help fix their desktop issue because chances are when he gets there he’ll look at the GUI and become confused.

  9. Learning Curve
  10. Many parents are content with the fact that they had to adapt to this whole new age of technology as it is. There are some of us out there that just can’t convince their parents that this “Linux” operating system is worth re-learning everything they have come to know on Windows.

Changing your parents from Windows to Linux can have its advantages, but when you have to explain to Mom that she can’t use this application, and Dad can’t use that application, they might not accept the idea. Your parents should NOT use Linux if they have applications that tie them to Windows, can’t agree to accept changing to alternative Linux applications, and are not willing to relearn a few things.

5 Reasons your parents should use Linux

It’s no secret that tech-savvy computer users typically become the go-to guy for all technical help in their circles. More specifically, Mom and Dad tend to always ask us for help with their computers. If you’re tired of the phone calls from Mom and Dad complaining on how sloooww their computer has become, how fast it used to be, how many pop-ups there are, etc., spending hours upon hours fixing and repairing, re-installing and scanning, then this post should convince you with 5 reasons why your parents should use Linux.

  1. Security
  2. The most obvious and important reason your parents should run Linux is the security the Linux operating system provides. While many of us tech-savvy computer users have little to no problems surfing the web and staying connected 24/7 without running into viruses and spyware, it’s almost inevitable for a non-savvy Internet user [read: majority of moms and dads] to stumble across a virus or malware on a website or in an e-mail. Linux is well known for the safety and security of browsing the web without the worry of the popular viruses that plague a good portion of the Internet. The main reason being that virus and malware developers stick to Windows due to its popularity and worldwide reach.

  3. Cost
  4. Why should your parents have to pay money for an operating system and additional applications when there are hundreds of Linux alternatives that can do the same things they probably need for absolutely free? The GNU General Public License (GPL) gives users the freedom to change and share free software. This is where GNU/Linux derives from. Mom and Dad shouldn’t have to fork out upwards of $300 just for the basics of an OS. Linux is free and widely available, it should be a no-brainer.

  5. Hardware
  6. One great aspect of Linux is that it works well with old hardware. Many times I’ll find that a lot of my friends parents have older model computers. They are brainwashed into thinking that in order to get off Windows 98, or Windows ME, they need to upgrade their whole system so they can install Vista. Linux works great on old machines – don’t even think about installing Vista on your Moms old 386, it just won’t work.

  7. Administration
  8. Administration of a Linux machine involves little to no work. If you chose to install Ubuntu Linux on your parents computer, they most administration they would have to do is click yes to install the updates when the Update Manager prompts them to. As an additional plus, for us savvy Linux users, if we needed to, we can open up SSH with a port forward and log into our parents computers remotely if needed. Additionally, I’ve had Linux computers that have literally sat turned on for years in a closet with very minimal administration. Linux just works.

  9. Dell
  10. You no longer can use the excuse that when you install Linux on your parents computer, it doesn’t work “out of the box”. With the semi-recent Dell and Canonical partnership you now have an option of buying a computer or laptop that comes pre-installed with Ubuntu Linux.

Alternatives to Mom & Dad’s Windows Applications

Below are a few alternatives to some common Windows applications that Mom and Dad may frequently use. For a more detailed list, see Alternatives to Windows Programs, Open Source Alternative, and The Linux Alternative Project.

Windows: Internet Explorer
Linux: Mozilla Firefox

Windows: MS Outlook
Linux: Mozilla Thunderbird or Evolution

Windows: Solitaire
Linux: AisleRiot Solitaire

Windows: ITunes
Linux: Banshee or Amarok

Windows: MS Word
Linux: OpenOffice.org

What do you need to do?

Step 1. Head over to the Ubunutu download site and download the latest Ubuntu Desktop ISO image.

Step 2. Burn the ISO image to a CD-R.

Step 3. Bring the CD-R to your parents house.

Step 4. Back up any necessary files on your parents computer.

Step 5. Place the CD-R in your parents CD-ROM drive.

Step 6. Reboot the computer.

Step 7. Install Ubuntu by following on screen instructions.

Step 8. Reboot after installation is complete.

Step 9. Enjoy the fact that your parents will stop bugging you to fix their computer. Instead you’ll get calls from mom asking Linux questions – isn’t that awesome?