Friday, February 15, 2013

How to capture C and CPP files in the linux operating system?

Q. I am new to linux and have been trying to figure this out forever for a homework assignment! I am supposed to use appropriate linux commands to capture all "C or CPP" files in the linux operating system and make a list of the files. I am using Xubuntu. I am a beginner and could use any advice! Thanks!

A. What does it mean to capture a file??

If you mean to find the files and list the results, use the 'find' command to search for *.c and *.cpp files in the whole system. You will get the result on the screen, and you can redirect the output to a file.

To find *.c files:
find / -name *.c

To find *.cpp files:
find / -name *.cpp

Explanation: the "/" means to start the search at the top of the file system, meaning that the search will include all the system. The "-name" means to search by name, and "*.c" is the file pattern you want to find.

To redirect the output, use "> output_file" for example:
find / -name *.cpp > output_file

Hope it helps. See the manual page 'man find' to learn more.

What's the difference between Linux operating systems?
Q. Linux has a lot of operating systems, I'm not even going to bother to list them. I was wondering, it there a difference between them? Does each type of Linux operating system hold a specific purpose? For example, Red Hat holds a different functionality to Ubuntu, or something like that.

A. Linux has many distros but all versions of Linux are the same OS.

Linux is extremely customizable. So much so that it'd be impossible for one person to do all the tweaks necessary to have what most people consider a polished and functional operating system. On top of that many Linux distros are heavily customized for specific purposes. Robotics, hardware appliance (routers for example), Real time OS (traffic lights, microwave ovens, unmanned aircraft), Music studios, Network security, Home theatre, Cash register, various industrial and scientific specialties, generic servers and so on.

There are also distros that are specialized to fit on a 1.44 floppy, thumb drives and a few distros specifically designed to run on CDs rather than be installed on a machine. There are distros that mimic other operating systems such as Mac OS and Windows so closely that at a glance you wouldn't know that you were not using those OS's. Other's are branded such as Dell's version of Ubuntu which is customized for Dell hardware.

There are also commercial versions of Linux. Red Hat Enterprise for example which is designed for high end servers and IBM's SUSE which has customizations for running on IBM virtual servers/being the host OS for the virtual servers, a desktop version which much of Europe's governments uses.

Distros often come with sub distros that are customized for various purposes. For example most major distros have a KDE and a Gnome version These are customized to people's favorite window managers and some distros support up to 5 or 6 window managers with sub-distros. Most support at least 2 or 3. Long term support, special purpose sub-distros like Ubuntu Studio which is geared for musicians are also common with widely used general distros.

The majority of distros however are shortcuts for Linux users to get what they want/need without spending the thousand of hours personally making those customizations. For example some like myself do too much customization and install too much software to upgrade a machine every 2 years. So long term support versions appeal heavily to me. I need and use a large variety of applications so it's important to have very large software repositories. Other people choose high performance bare bone distros. Some people want total control over their sytem and choose primitive distros that give you the bare min necessary, anything else the user installs themselves and customize as they see fit. (not recommended for anybody but an expert).

There are philosophical choices involved in choosing a distro. One big split for example is RH vrs Debian based systems. The RH fork (RHE, SUSE, Mandriva, CentOS) and Debian fork (Ubuntu, Debian) have some small differences in the way they are built. For example RH systems use YUM for software installation while Debian based systems use Apt-Get. You can install and use YUM on Debian systems and Apt-Get on RH systems. It's just a matter of defaults. Same with how root privileges are handled, and other minor details. The average user won't notice such subtle differences.

I've included a link to distro watch which gives details about specific distros as well as release cycles and where to download them.

How do I rescan for wireless connections when I've recently deleted them - Linux operating system?
Q. I recently purchased an Acer Netbook with Linpus Linux operating system. I stupidly deleted all of the wireless connections it found so that I wouldn't be inadvertently 'piggy backing'. However, I seem to have deleted even my own and it won't even scan for anything now, though I am following the correct procedures for it to do a re-scan. What have I done? Thank you for any guidance here!

A. Does Linpus have a package manager called synaptic? If it does you can probably reinstall what you have removed. I am not familiar with Linpus Linux.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

No comments:

Post a Comment