Sometimes we may have to split a large file into several small files before transfering 'em to another host. Later we can assemble these small files to re-create the original large file at the destination. Splitting can be done on any file type, including binary files, with the help of split utility of Solaris. Read the man page of split, for all the available options. In the example, we will be using the following options to split one 11M file into several 2M files.Syntax: split [-b nm] [file [name]] where: -b nm suggests splitting a file into...
Thursday, 30 June 2005
Thursday, 23 June 2005
Solaris: (Undocumented) Thread Environment Variables
Posted on 16:45 by Unknown
The new thread library (initially called T2) on Solaris 8 Update 7 and later versions of Solaris, provides a 1:1 threading model, for better performance and scalability. Just like other libraries of Solaris, the new thread library is binary compatible with the old library, and the applications linked with old library continue to work as they are, without any changes to the application or any need to re-compile the code.The primary difference being the new thread library uses a 1:1 thread model, where as the old library implements a two-level model...
Monday, 20 June 2005
Solaris 10: USB Digital Camera HOWTO
Posted on 01:51 by Unknown
The following instructions are very "generic", and applicable to all makes/models of digital cameras. Sony DSC-V1 camera was used to show all the examples.Since the vendor supplied Windows driver cannot be installed on Solaris, it needs some effort to make the digital camera work on Solaris 10. The steps are as follows:Bind the device (digital camera) to the ugen driver. Then the ugen driver can talk to the digital camera (device).ugen is a generic USB driver, which is part of the Solaris USB Driver Development Kit, presents USB devices to applications...
Tuesday, 14 June 2005
OpenSolaris: Open for download
Posted on 00:29 by Unknown
The much awaited OpenSolaris has finally arrived. Too bad it cannot be treated as a vaporware anymore. I believe the following resources are helpful for those, who are completely new to Solaris/OpenSolaris.OpenSolaris:OpenSolaris community web siteOpenSolaris release notesOpenSolaris source browserDownload OpenSolaris source code GenUnix MirrorBitTorrentsOpenSolaris bug databaseOpenSolaris roadmapOpenSolaris community tools (Sun Studio 10, GCC compilers)License:Common Development and Distribution License (CDDL)Documentation:CuddleTech's HowTo:...
Sunday, 12 June 2005
C/C++: Assertions
Posted on 03:14 by Unknown
What is an assertion?An assertion is a statement that can be used to test our assumptions about certain parts of the program. It is a boolean expression, and by placing an assertion, we expect it to return true. Placing assertions in the code increases the robustness of the code by letting the programmer catch the logic errors in the early stages of the development. If the assertion returns true, it confirms that the assumptions about the behavior of the program is right. Otherwise, the system throws an error.Pre-, Post-conditionsAssertions are...
Thursday, 9 June 2005
C/C++: conditional compilation and #if 0
Posted on 20:53 by Unknown
It is a common practice to use compiler's preprocessor for conditional compilation. Conditional compilation is useful when the application has platform specific code, and if it has to be supported on more than one platform.eg.,#ifdef SOLARIS Solaris specific code here#else if defined (WIN32) Windows specific code#endif Besides platform specific code, conditional compilation is useful in many ways. It is extremely useful to disable large chunks of code in a program. If we need to keep some code only for future reference Or if we need to disable...
Sunday, 5 June 2005
Solaris: Installing apps/packages with pkg-get
Posted on 23:45 by Unknown
Often it is very frustrating to install software on *nix systems, and Solaris is no exception. Most of the times, non-availability of software in "ready to install" form, and/or the lack of installed dependencies on the local system, makes it even hard for the novice end-user. Wouldn't it be nice to have some kind of tool, that does the installation for us automatically, including dependencies (if any)? Fortunately, tools like apt-get, pkg-get do exist on some *nix environments, for automatic package installations.apt-get (Advanced Package Tool)...
Thursday, 2 June 2005
UNIX: Writing a Signal Handler
Posted on 14:00 by Unknown
What is a signal?A signal is a software interrupt, sent to a process to notify that an event has occured. Signals are usually sent by the Operating System (kernel) to notify processes that some event has occurred. Due to this, the processes need not poll for a particular event. By their nature, signals interrupt whatever the process is doing at that moment, and force it to handle them immediately. Because events may occur asynchronously, it is a good practice for the process to handle all the relevant signals using the API provided by the OS.For...
Subscribe to:
Posts (Atom)