Search This Blog

Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, 11 January 2012

Mandriva in danger of closing its doors


Takeaway: Take on the rumors of Mandriva closing its doors. January 16, 2012 is but a Monday away. Would the closing of Mandriva’s doors have a lasting effect on the Linux landscape?
Nothing is sacred these days. In times of economic crisis, anything could go any way, at any time. Such is the case with Mandriva. By January 16, 2012 we could all see the end of a distribution that was just starting to make itself relevant again. After so many ups and downs, causing it to flounder in obscurity, Mandriva releases its latest Powerpack, which helped to make GNOME 3 a viable desktop for both businesses and home users. And then…a share holder issue reared its ugly head.
Mandriva began as Mandrakesoft and suffered through more ups and downs than most Linux distributions had to endure. In 2006, the company emerged from bankruptcy to become Mandriva and, for the most part, lived in the shadows of Ubuntu, Fedora, Red Hat, Linux Mint (and many other flavors of Linux). But when Powerpack 2011 hit the shelves it looked as if everything was going to finally turn back around for the French distribution. Mandriva finally had what looked like a major hit on their hands and, before Powerpack could gain any traction, the news of a possible shutdown seeped from under the doors of Mandriva.

What’s going on?

It’s fairly simple. In 2011 rumors began spreading that Mandriva was to be acquired by Linagora. But those rumors turned out to have no validity. That wasn’t the end of the rumor mill. Only the next words to be whispered about, weren’t so vapid. This time it was a regular contributor to the Mandriva community, Rapahël Jadot. On December 30, he spoke:
“Well, let’s make it short: everything was fine, but there is a big problem: a minor shareholder (Linlux) refuses the capital injection required for Mandriva to continue, even though the Russian investor had offered to bear it alone. “Except turnaround Mandriva should cease activity Jan. 16…”
What this means exactly is this. Linlux SARL, a minority investor holding 42 percent of the shares, is blocking a move to raise new capital for Mandriva — even though the majority shareholder (Townarea Trading & Investment Ltd.) has approved the plans.

Why is this happening?

It seems accusations are pointing the finger of blame at Marc Goldberg, the lead at Linlux, who doesn’t want to see his personal investments in Mandriva reduced. This is not Goldberg’s first attempt at blocking investments. It could be his last. With the community driven fork, Mageia, alive and well, it would be a no-brainer for the current community of Mandriva developers to migrate, en masse, to greener (less drama-filled) pastures. But even with Mageia in development, the loss of Mandriva would (and should) be felt across the Linux-verse. Mandriva has done a lot for the development of Linux (and the most recent Powerpack should prove that). Beyond that, losing any Linux distribution at the hands of shareholders who seem hell-bent on destroying something with a storied past is beyond shame.
But what drags this down a darker path is how this reminds me of the changes the Linux community has gone through. I remember well meeting the small crew of Mandrakesoft at a Linux convention. They were exciting, fun, and ready to bust loose on the world a fantastic Linux distribution that would certainly change the way people look at Linux.
Now? That joy-filled group is no more and the distribution they were so proud of is on the brink of disappearing. I hope this doesn’t come to fruition. But should Mandriva go the way of Caldera Open Linux (and many other distributions), I hope Mageia continues on where Mandriva Powerpack 2011 left off. As well, I hope all of those that have put so much time, effort, care, and concern into Mandriva find new paths that will bring them success.
As for the shareholder that has done nothing but attempt to bring down Mandriva at every turn? Well, I hope he never bothers to invest in another Linux company again.
The really sad thing about this is that I’m not sure the loss of Mandriva will really effect Linux as a whole. There was a time when this news would have been a serious blow to the Linux platform. Now? Not so much. Mandriva’s turbulent past has caused this distribution to all but disappear from the Linux distribution map. I would like to say this would have lasting repercussions on the Linux landscape; but sadly enough, I don’t think it will. As much as I enjoyed the latest release of Mandriva, I believe the loss of this distribution will hardly be felt…especially with the Mageia fork in full-blown development.

Thursday, 20 October 2011

Ubuntu 11.10 brings Ubuntu Unity closer to fine


Ubuntu 11.10 brings Ubuntu Unity closer to fine
Takeaway: With the release of Ubuntu 11.10, Ubuntu Unity makes some progress on the desktop front. Is it enough? Here's the take on the state of the desktop from Canonical.
If you’ve been following me long enough, you know since the inception of Ubuntu Unity my relationship with that new desktop has been one of love-hate. When Unity was first rumored and the designs and philosophy were made known, the relationship was one of love. But when 11.04 was released, that relationship quickly shifted to hate. But now, 11.10 is out and Ubuntu has had a chance to make good on their Unity promises. I have to say, after upgrading to 11.10 … I’m pretty impressed with the improvements.
I’ll preface the rest of this by saying it’s not perfect, but it’s closer to being a fine desktop than it’s previous iteration.
Now … just what has improved? Let’s take a look. I am taking this from the perspective of an end-user, so there will be no talk of development this or power-user that. What I am interested in is whether or not Unity has come far enough along for the average end user.

The Good

Figure A
The Unity Dash has had a bit of overhaul, making it easier to access various pieces. Figure A shows the Dash in action. Click on the Dash icon to reveal a new overlay that allows you to do the following (via icon):
  • Open up various categories of apps (Media, Internet,  and More).
  • Open up default apps (as configured within System).
  • Find files.
You will also notice, at the bottom of the Dash overlay, a row of tabs. These tabs are (from left to right):
  • Dash Home
  • Applications
  • Documents and folders
  • Media
Figure B
So what the developers of Unity have done is make it incredibly easy to get to various applications, files, and folders. This is a big plus for not just average users, but for any level of users. Another nice addition to the Dash is the ability to quickly filter results by categories. Take a look at Figure B (sorry, wallpaper is set to randomly change.)
Click on the Applications Tab in the Dash Overlay and you can then filter by various categories, making the search for that specific file or application much easier.
It is also possible now to eject external discs and USB devices from the Launcher. Simply right-click the device to reveal a menu offering:
  • Open
  • Eject
  • Safely Remove

The not so good

The Metaphor is still the big issue. Most end users do not like change — of any kind. They don’t like drive letters to change, they don’t like the look and feel of things to change. This is the one glaring problem with driving such a grand, sweeping change such is Ubuntu Unity. New users will take one look at it and say “Where’s my Start button? Where are my icons?” There is no way around this and new users will just have to accept that change is an inevitability with the PC desktop. Even with Windows — change happens and users have little to no choice but to move on. Eventually the touch-screen friendly desktop interface such as Unity and Gnome 3 will be less a shock to users (granted it would help if Canonical would come through on the promise of touchscreen hardware to happily marry with the interface).

More not so good

Why is it the developers of Ubuntu Unity have decided that configuring the desktop is just not something we mortals need. Sorry people, but I am a serious tinkerer on the desktop. I want my desktop cake and I want to eat it too! But alas — configuring the Unity desktop is just not meant to be (outside of changing your desktop background.) This does need to change. People (even new users) want to configure that desktop!

Even more not so good

I’m still not sold on the Apple-like application menu. No more do applications have their own menu. You want to access an application menu, you have to have that application in focus and then go up to the main bar at the top of the window. This isn’t terribly efficient when you have many windows open.
And speaking of many windows open — I want, nay need, my sloppy focus. I do not like to have to click on titlebars (or any location within the window) to give a window focus. I am all about making as few clicks and points with the mouse as possible. Give me sloppy focus and auto-raise back!
The conclusion thus far
Okay, so Unity is beginning to show promise. I have two suspicions here:
  1. Given time Unity will finally become a legitimate player on the average user desktop field.
  2. Given the proper touch-screen hardware, Unity will finally be able to show just how user-friendly it can be.

Thursday, 18 August 2011

Five tips for printer sharing in Linux


Five tips for printer sharing in Linux
Takeaway: Admins often shy away from sharing a printer from Linux. Following are few simple steps that can simplify setup and sidestepping problems.
Printer sharing in Linux isn’t all that hard. But when asked to set it up, most admins would rather chew off their own arm. Why? Lack of familiarity? Ignorance? Who really knows. But the truth is, it’s not hard and it makes for an incredibly reliable service.
Let’s take a look at some tips that will make sharing out a printer from the Linux operating system much easier for both the admin and the end user.

1: Use the GUI

Both GNOME and KDE have incredibly easy graphical tools to help with the sharing of files, folders, and printers through Samba. The printer sharing feature is found in the Printer Preferences tool on both desktops and can be configured on both the printer and the server levels. The printer level is where the printer is actually shared out, whereas the server level is where a number of options can be set. Most instances will only need the printer-level settings.

2: Make sure Samba is configured properly

One of the issues you will find is that if Samba isn’t configured properly, no amount of GUI will help. This is especially true in a mixed environment. If you do have a mixed environment (especially Windows and Linux), it will be crucial that Samba is correct. Make sure the security= line uses the right mode and that files can be shared to all necessary clients. Once you’ve established that, verify that the entry for the printers is correct. You’ll be looking for two sections: [printers] and [print$]. The former is the global printer configuration and the latter is the configuration necessary for Windows clients.

3: Provide drivers

Unless you’re okay with going to every client and installing drivers for the printers, you will want to have drivers for all flavors of Windows on your printer server for use. These are configured in the [print$] directive in the smb.conf file. The most important entry in that is the path = variable. This will be where the drivers are stored. By default, this is /var/lib/samba/printers/. Make sure you have the explicit pathname to these drivers and to make your life easy, take out any spaces in the directory names for the drivers.

4: Make sure Samba is starting at boot and iptables isn’t blocking

I have found this to be a sticking point in some instances. If power goes out and the Linux machine sharing the printers goes down, Samba may not be running when the machine restarts. When this is the case, no one will be able to print. Of course, how this is done will depend upon which distribution you use. Some distributions offer a GUI tool for this task and some do not. NOTE: Do not do this through the Startup Applications GUI, as that is for user-level applications. Also, make sure your firewall isn’t blocking the ports for printer sharing. The most important port you need to have open is port 631, which is the CUPS (Common UNIX Printer System) port.

5: Grab a Web-based admin tool

CUPS offers an easy-to-use printer configuration tool. Go to http://address_to_printer_server:631 and you will find a tool that makes configuring your printers a snap. To use cups for printer sharing (UNIX to UNIX), you can use the cupsctl command (man cupsctl for more information). For UNIX-to-Windows or UNIX-to-Mac printer sharing, you will need to use a Web-based tool like Webmin. NOTE: When using Webmin, your smb.conf fill will be rewritten. I would make a copy of that file before using Webmin. Samba used to have a tool called Swat for Samba printer sharing setup, but that tool is no longer maintained.

Avoiding problems

As we all know, printing is one of those administrative tasks that can go wrong for so many reasons. Add the layer of multiple platforms and the level of challenge grew even greater. But with the above tips, you should be five steps closer to having your Samba printer server up and running.
**************************

Saturday, 6 August 2011

10 ways the Linux community can fix the mess on the desktop


10 ways the Linux community can fix the mess on the desktop

Linux

1: Ubuntu needs to drop Unity

Okay, this one is a bit harsh, but Ubuntu made a huge mistake with Unity. Ubuntu simply needs to admit defeat and use GNOME 3 as its default desktop. I realize that Unity is young, but it’s an idea that simply isn’t flying with the Linux community and does not improve on what GNOME 3 offers. Because of that, there is little-to-no reason to keep it around. I gave Unity as much of a chance as I could (as did many of the Linux users I know), but it’s just too flawed. Although GNOME 3 has not exactly been welcomed with open arms, it will eventually become the standard GNOME.

2: Classic GNOME should be forked

I initially thought that Classic GNOME, like KDE 3, should be retired. This is a good idea with regard to GNOME 3, but it causes problems when machines are low-powered or do not have the graphics hardware to run GNOME 3. So instead of retiring it, fork it so it can exist as a different choice altogether. I have to admit, of all the desktops I have used, the latest classic GNOME is probably the most solid. Not only is it stable, it’s not nearly the resource hog that certain other desktop tend to be. Let GNOME live — but as a fork to ease the burden on the GNOME developers.

3: A uniform compositor should be used

I can’t help it; I’m a fan of the compositor. I really enjoy desktop effects, transparency, the cube, you name it! The only problem is that every desktop that can use a compositor uses a different one. At one point, most of them simply employed Compiz. Not the case now. KDE has its own compositor, E17 has Ecomorph, GNOME has Mutter, and so on. Why is this? Compiz, for the longest time, worked with both GNOME and KDE. Why couldn’t the desktops simply decide to stick with Compiz and adapt that as needed? There is no reason to reinvent the wheel!

4: Distributions need to make alternate desktops easy to install

Back when I first started using Linux, the installation process allowed the user to choose from a long list of desktops. That was when a Linux installation spanned four to six disks and could take an hour or two to install. Now everything is focused on the Live CD, which does not allow for the inclusion of multiple desktop installation. That can be fixed by simply allowing users to select their desktop of choice and then having the package manager download and install during the operating system installation.

5: Distributions need to stop modifying desktops

This can get really annoying and is a challenge to support. Many distributions decide it best to modify the desktop for whatever reason. This isn’t necessary. Distributions should stick with the default configuration of the desktop and leave the configurations to the user. This standardization will go a long way toward simplifying support and will help to ease users into the Linux desktop. If GNOME 3 and KDE are the same across the board, users won’t have such trouble when choosing distributions.

6: GNOME Shell should be more configurable

As it stands, GNOME 3 isn’t all that configurable. That was one of the great things about Classic GNOME — users could configure that desktop to their heart’s content. Now? Not so much. In fact, GNOME 3 seems to have gone the Apple/MS route and locked the user into the configuration the developers think works the best. That is counter to the heart of the Linux user.

7: Alternate desktops need more exposure

I don’t know if you are aware of this, but there are some incredible Linux desktops available. You can find everything from the bare-bones, lightweight desktop to the eye-candy heavy do-it-all desktop. The problem is that most users don’t know about them. These alternative desktops really need to make an effort to get the word out that they exist. Instead of settling for living in the fringes, desktops like E17 should be widespread. Xfce is an amazing combination of lightening fast and feature rich — why don’t more people know of this? If these desktops were better known, the GNOME 3/Unity/KDE 4 drama would ease up.

8: All desktops need a more standardized configuration

I’ve always thought the desktop could use a bit of standardization (while holding on to individuality). This would go a long way toward making the major desktops a bit user friendly. Both KDE and GNOME 3 are trying to go this route and they are almost there… but it needs to be taken further. The “control panel” tool should be easily recognized and accessed by users. KDE calls its tool System Settings, but that could easily lead one to think that user preferences won’t be found there. If Microsoft has a patent on the term Control Panel, KDE and GNOME (and E17 and Xfce and…) need to come up with a unified term for this tool so that even new users immediately know what the tool is used for.

9: Distributions should decide who their audiences are

Is Ubuntu for new users only? What about Fedora? Linux Mint? Who do these distributions ultimately target? With this question answered, the choice of desktop would be much easier. If a distribution is truly for new users, would you put GNOME 3, Unity, or KDE 4 on a distribution for them? I would suggest KDE 4. Although the new user might face some challenges, it at least offers a level of familiarity that neither GNOME 3 or Unity offers. Or maybe Xfce would be the ideal desktop for a new user. But ultimately, the distributions need to decide who, precisely, they target.

10: Lightweight versions of EXISTING desktops should be created for low-powered and netbook machines

If Unity were killed, a lightweight version of GNOME 3 would need to be created to satisfy those using low-powered and netbook computers. GNOME 3 is not for old hardware. Although there are plenty of distributions available that can power lesser machines, both GNOME and KDE offer features that would appeal to the modern user (such as integrated Gwibber and other social tools). This could easily be accomplished by removing the compositor and unnecessary packages.

Time for a Linux revolt?

There is no single, ideal solution for the issues at hand. But the Linux desktop situation needs some attention before it gets out of control. I would hate to see a complete revolt against the current crop of desktops, but if it comes down to that, I’m all for a revolution. When that revolution comes, you will most likely see me happily computing away on Bodhi Linux, which offers the best of Ubuntu and E17.






***********************************

Monday, 1 August 2011

3 Easy Ways to Connect to Windows Shared Folders from Linux



3 Easy Ways to Connect to Windows Shared Folders from Linux


Connecting to file servers is something most people do on a daily basis even without thinking about it. In Linux, it may not be intuitive how to quickly connect to a samba or ftp server without a separate program. Here are a few different ways to connect to a remote file server without needing to touch a terminal.

Using Keyboard Shortcut
You can connect to a server by opening the run application window with the Alt+F2 keyboard shortcut. You will just need to specify the server type by adding the protocol at the beginning of the command. For example smb:// will connect to a samba share; other supported protocols are ssh, ftp, sftp, http, and https.

Note: In the example below my server name is playground and the shared folder is called music.

1
If your server requires a password to connect, fill out the next window that pops up and select how long you would like it to store your password.

2

A Nautilus window will automatically open with the server you just connected to, and you should have a shortcut under places on the left side and a shortcut on your desktop.

3

From GNOME Menu

If you are using Ubuntu, and many other GNOME based distributions, you will have a places menu on your top menu bar. Open that menu and click connect to server.

4

A new window will open up with a drop down so you can select what type of server you are connecting to.

5

For a samba/cifs server select Windows share and fill out the required information.

Note: Unlike the run application window, you do not need the slashes to connect here.

6

Alternatively, you can also get to the connect to server window from Nautilus’ file menu.

7

With a Shortcut

If you would like instant access to the connect to server window from your GNOME menu bar right click on the menu you would like to add the shortcut to and click add to panel.

8

In the window that pops up, search for “connect” and connect to server should be one of the results. Highlight the shortcut and click add at the bottom of the window.

9

Now you will have an additional shortcut on your GNOME bar for easy access.

10

***************************

Monday, 18 July 2011

Five tips for a smoother Linux command-line experience

Five tips for a smoother Linux command-line experience

Takeaway: Many Linux users find the command line intimidating and avoid it like the plague. But these tricks and shortcuts can make the command line more manageable — and downright useful.

When I talk to new (and some even not-so-new) Linux users about the command line, I sometimes get a fairly high cringe factor. This always surprises me, seeing as how the command line is not that difficult. Nevertheless, there it is: Many users simply do not want to use the command line. I get that. But the truth is, at some point, the command line might well be a necessity. And when it is, it’s good to be comfortable using it.

Here are five tips to help make the Linux command-line experience much smoother. I’m not digging deeply into any specific command. These are just a few pointers that will help users understand what they are doing and how to make it easier.

1) Aliases
Certain commands can be ridiculously cumbersome to type. They go on and on and on with options, switches, addresses, and more. Not only are those command painful to type (over and over again), but they’re also a challenge to remember. Fortunately, the Linux command line has a built-in ability to create aliases for those commands. Aliases are lines that are entered into the ~/.bashrc file under the “#some more aliases” section. The format of the alias looks like:
alias ALIAS=COMMAND
where ALIAS is the nickname of the alias and COMMAND is the full command of the alias. There may be instances where the full command must be placed in single quotes (if there are spaces in the command). The best way to test an alias is to do the following:

  1. Open a terminal window.
  2. Create the alias by editing the ~/.bashrc file.
  3. Save the ~/.bashrc file.
  4. Open another terminal.
  5. Test the alias. If the alias works, you’re done. If not, go back and re-edit the file.

2) Terminal history
Open up a terminal window and hit the Up arrow on your keyboard. You should start seeing a list of previously issued commands. This is your bash history. The history keeps a list of the commands you have run and allows you to rerun them simply by locating them in the history (until the command you want shows up at the prompt) and hitting the Enter key. By default, at least in the Ubuntu distribution, the history will contain the latest 1,000 entries. You can change that in the ~/.bashrc file. Look for the line HISTSIZE=1000 and change the number to reflect whatever you require.

3) Tab completion
This is a great tip that always helps. If you are unsure of the exact name of a command, but you know the first couple of letters, type them and hit the Tab key. Bash will then attempt to complete the command for you. If there are multiple possible entries, it will ask whether you’d like to see all of them. This is a great way to locate commands when you can’t remember the name or you simply don’t want to type the entire command. For example, say you know there is a command-line way to start the GNOME Control Center, but you can’t remember the command. You’re sure it starts with gnome, so you type gnome and hit the Tab key. Bash will display a number of possible options, including gnome-control-center. There you go.

4) Running multiple commands at once
Running multiple commands is helpful when compiling applications. Instead of running ./configure, wait for that to complete, then make, wait for that to complete, and then make install, you could instead combine them together like so:
sudo ./compile && make && make install
Notice the use of sudo. It’s needed because the make install command most always requires administrative rights, since this command is copying the executables into the correct directory (usually /usr/bin, /usr/sbin, or /usr/local/bin). Of course, if your compile or make requires any options, you can add them at the same time.

5) Running a second command with prior command arguments
This trick is great. Say you search for the directory ~/firewalls, only to find out that the directory does not exist. Instead of having to issue the command mkdir ~/firewalls, you can use a special trick to auto-magically create that directory. The trick in this case, would be
mkdir !*
The !* characters tell bash to run the new command using the previous command arguments. Here, the arguments are ~/firewalls. The mkdir command is run using the arguments from the previous command, so the full command is then mkdir ~/firewalls. Although this is a simplistic example, it illustrates how this tip can be useful.

Friday, 8 July 2011

Five tips for improving Linux Server performance

Five tips for improving Linux Server performance


Most Linux server distributions, out of the box, will outperform proprietary systems. But that doesn’t mean there aren’t things you can do to improve the performance of your server. In fact, there are always ways to eke out a bit more performance, no matter the operating system. But in this article, I want to speak directly to boosting the performance of the Linux server.


1) Kill services that are not needed
This particular trick will go a long way toward improving the performance of your server. With some Linux servers, certain services seem to want to run by default, regardless of whether they are being used. If that is the case, make sure those services are not running. For example: Samba. If you’re not serving files to Windows or other platforms, kill the Samba daemon. The same holds true for many other services. Your best bet is to decide what your server IS doing and then go through and kill what it doesn’t need. This will also have the benefit of making your server more secure.


2) Pay close attention to SELinux
SELinux is an often misunderstood tool. Its purpose is to enhance the security of a server or desktop. It is there for a reason and should not be stopped altogether. It should, however, be configured to meet the specific needs of your server. SELinux is quite powerful, and if it’s improperly configured, that power can rob your system of much-needed CPU cycles and slow down data throughput. If your distribution uses SELinux, be sure you have a strong understanding of it so you can fine-tune it to meet your needs.


3) Compile software from source
This might seem a bit counterintuitive, but when you compile your software from source, you can often run the compilation with flags and arguments highly specific to your hardware and/or needs. This goes for software that runs services and, of course, the kernel itself. The more hardware/need-specific you make your software, the more performance you will gain. Of course, this does require some experience with installing from source. I would recommend starting with this method on a test machine to get used to how the software can be better tailored to fit your situation.


4) Keep updated
This is insanely important from both a performance and a security standpoint. I see it so often: administrators ignoring updates for fear the updates will break their currently running software. If you are one of those admins, I recommend having a testbed server that mirrors your production server. With that testbed in place, you can run the updates prior to running them on the production machine so you will know precisely what could go wrong. From my experience, though, it’s a rare occasion that something does go wrong with a Linux software update.


5) Can the GUI
If you really need as much performance as possible, you can do one of two things: Use a GUI-less server installation or run the server in run level 3. If you need the GUI to get the machine up and running well, you won’t need that GUI running all the time. So instead of running GDM or KDM (and stealing resources), edit the run level so that the boot process stops at run level 3 - console login. This will not only save CPU cycles and memory, it will also circumvent the possible security issues of having GUIs running on your precious server. Each distribution edits the run level differently, so make sure you understand how to make this change before you attempt it.




*************************

Thursday, 23 June 2011

Linux / Unix Command : ar

Linux / Unix Command : ar

ar - create, modify, and extract from archives


Command Format :-
ar [-X32_64] [-]p[mod [relpos] [count]] archive [member...] 


Description :-
The GNU ar program creates, modifies, and extracts from archives. An archive is a single file holding a collection of other files in a structure that makes it possible to retrieve the original individual files (called members of the archive).

The original files' contents, mode (permissions), timestamp, owner, and group are preserved in the archive, and can be restored on extraction.

GNU ar can maintain archives whose members have names of any length; however, depending on how ar is configured on your system, a limit on member-name length may be imposed for compatibility with archive formats maintained with other tools. If it exists, the limit is often 15 characters (typical of formats related to a.out) or 16 characters (typical of formats related to coff).

ar is considered a binary utility because archives of this sort are most often used as libraries holding commonly needed subroutines.

ar creates an index to the symbols defined in relocatable object modules in the archive when you specify the modifier s. Once created, this index is updated in the archive whenever ar makes a change to its contents (save for the q update operation). An archive with such an index speeds up linking to the library, and allows routines in the library to call each other without regard to their placement in the archive.

You may use nm -s or nm --print-armap to list this index table. If an archive lacks the table, another form of ar called ranlib can be used to add just the table.

GNU ar is designed to be compatible with two different facilities. You can control its activity using command-line options, like the different varieties of ar on Unix systems; or, if you specify the single command-line option -M, you can control it with a script supplied via standard input, like the MRI ``librarian'' program.


Options :-
GNU ar allows you to mix the operation code p and modifier flags mod in any order, within the first command-line argument.
If you wish, you may begin the first command-line argument with a dash.

The p keyletter specifies what operation to execute; it may be any of the following, but you must specify only one of them:

d
Delete modules from the archive. Specify the names of modules to be deleted as member...; the archive is untouched if you specify no files to delete. If you specify the v modifier, ar lists each module as it is deleted.

m
Use this operation to move members in an archive. The ordering of members in an archive can make a difference in how programs are linked using the library, if a symbol is defined in more than one member. If no modifiers are used with "m", any members you name in the member arguments are moved to the end of the archive; you can use the a, b, or i modifiers to move them to a specified place instead.

p
Print the specified members of the archive, to the standard output file. If the v modifier is specified, show the member name before copying its contents to standard output. If you specify no member arguments, all the files in the archive are printed.

q
Quick append; Historically, add the files member... to the end of archive, without checking for replacement.
The modifiers a, b, and i do not affect this operation; new members are always placed at the end of the archive.

The modifier v makes ar list each file as it is appended.

Since the point of this operation is speed, the archive's symbol table index is not updated, even if it already existed; you can use ar s or ranlib explicitly to update the symbol table index.

However, too many different systems assume quick append rebuilds the index, so GNU ar implements "q" as a synonym for "r".

r
Insert the files member... into archive (with replacement). This operation differs from q in that any previously existing members are deleted if their names match those being added.
If one of the files named in member... does not exist, ar displays an error message, and leaves undisturbed any existing members of the archive matching that name.

By default, new members are added at the end of the file; but you may use one of the modifiers a, b, or i to request placement relative to some existing member.

The modifier v used with this operation elicits a line of output for each file inserted, along with one of the letters a or r to indicate whether the file was appended (no old member deleted) or replaced.

t
Display a table listing the contents of archive, or those of the files listed in member... that are present in the archive. Normally only the member name is shown; if you also want to see the modes (permissions), timestamp, owner, group, and size, you can request that by also specifying the v modifier.
If you do not specify a member, all files in the archive are listed.

If there is more than one file with the same name (say, fie) in an archive (say b.a), ar t b.a fie lists only the first instance; to see them all, you must ask for a complete listing---in our example, ar t b.a.

x
Extract members (named member) from the archive. You can use the v modifier with this operation, to request that ar list each name as it extracts it.
If you do not specify a member, all files in the archive are extracted.

A number of modifiers (mod) may immediately follow the p keyletter, to specify variations on an operation's behavior:

a
Add new files after an existing member of the archive. If you use the modifier a, the name of an existing archive member must be present as the relpos argument, before the archive specification.

b
Add new files before an existing member of the archive. If you use the modifier b, the name of an existing archive member must be present as the relpos argument, before the archive specification. (same as i).

c
Create the archive. The specified archive is always created if it did not exist, when you request an update. But a warning is issued unless you specify in advance that you expect to create it, by using this modifier.

f
Truncate names in the archive. GNU ar will normally permit file names of any length. This will cause it to create archives which are not compatible with the native ar program on some systems. If this is a concern, the f modifier may be used to truncate file names when putting them in the archive.

i
Insert new files before an existing member of the archive. If you use the modifier i, the name of an existing archive member must be present as the relpos argument, before the archive specification. (same as b).

l
This modifier is accepted but not used.

N
Uses the count parameter. This is used if there are multiple entries in the archive with the same name. Extract or delete instance count of the given name from the archive.

o
Preserve the original dates of members when extracting them. If you do not specify this modifier, files extracted from the archive are stamped with the time of extraction.

P
Use the full path name when matching names in the archive. GNU ar can not create an archive with a full path name (such archives are not POSIX complaint), but other archive creators can. This option will cause GNU ar to match file names using a complete path name, which can be convenient when extracting a single file from an archive created by another tool.

s
Write an object-file index into the archive, or update an existing one, even if no other change is made to the archive. You may use this modifier flag either with any operation, or alone. Running ar s on an archive is equivalent to running ranlib on it.

S
Do not generate an archive symbol table. This can speed up building a large library in several steps. The resulting archive can not be used with the linker. In order to build a symbol table, you must omit the S modifier on the last execution of ar, or you must run ranlib on the archive.

u
Normally, ar r... inserts all files listed into the archive. If you would like to insert only those of the files you list that are newer than existing members of the same names, use this modifier. The u modifier is allowed only for the operation r (replace). In particular, the combination qu is not allowed, since checking the timestamps would lose any speed advantage from the operation q.

v
This modifier requests the verbose version of an operation. Many operations display additional information, such as filenames processed, when the modifier v is appended.

V
This modifier shows the version number of ar.

(ar ignores an initial option spelt -X32_64, for compatibility with AIX. The behaviour produced by this option is the default for GNU ar. ar does not support any of the other -X options; in particular, it does not support -X32 which is the default for AIX ar.)


******************************
Related Posts Plugin for WordPress, Blogger...