Hello Guys, How all are doing? I have an issue in Unix and want help from all of you I have a file in UNIX which it read by line by line , If at the end of line '0' is written the it should fetch that line into another file and change '0' to '1' and If at the end of line '1' is written then it File Read and Write. Any help appreciated. Hi, I am creating a progress bar for file upload for which I have CGI script which copies the data and depending on certain bytes it increments the progress bar.
Here, I am writing the incremented value to a file which is read by Ajax at server end. However, here I want to ask that, is it IP Networking. Hi, We have smb client running on two of the linux boxes and smb server on another linux system.
During a backup operation which uses smb, read of a file was allowed while write to the same file was going on. Also simultaneous writes to the same file were allowed. Following are the settings in the After System power get failed File system is not getting mounted in read- write mode 1 Reply. Is there any way to write to a text file with scripting? I need to write to a text file two lines of text for the amount of files in the current directory.
I have tried to show the file name whose size is greater than byte in current directory. Please help me. RedHat Commands. There are several sub-directories that are used as holding areas for the applicable programs.
We'll talk about them later in chapters 10 and Although these directories did exist in ODT 3. However, these two directories are one of the key components of OpenServer. Okay, so that's about it. There were many directories that I skipped As I said I would at the beginning of this section. Think about the comparison that I made to a tourist map. We visited all the museums, year-old churches and fancy restaurants, but I didn't show you where the post office sub-stations were. Granted that such offices are necessary for a large city, but you really don't care about them when touring the city.
Just as there are certain directories and files that are not necessary for an appreciation and understanding of the SCO UNIX directory structure. We can refer to individual programs as either utilities or commands, depending on the extent of their functions. However it is difficult to label collections of files.
Often the labels we do try to place on these collections do not accurately describe the relationship of the files. However, I am going to try. If you have been working with an SCO system for a while, there are certain aspects of the operating system that you may have heard of, but not fully understand what they do.
In this section we're going to talk about functions that the system performs some of the programs and files that are associated with these functions. We're also going to talk about how many of the system files are grouped together into what are referred to as "packages" and discuss some of the more important packages.
I will go into more detail about the contents of these files in the section on installing your system. However, I need to talk about some of these packages in order to set the stage for many of the topics I will be covering later.
Why is it important to know the names of the different packages? Well, for the average user, it really isn't. However, the average user logs on, starts an application and has very little or no understanding of what lies under the application. The mere fact that you are reading this book says to me that you want to know more about the operating system and how things work together.
Since these packages are the building blocks of the operating system at least in terms of how it exists on the hard disk , knowing about them is an important part of understanding the whole system. First, let's talk about how the packages are broken down in ODT. You can get the names of all the packages by running this command:. Most people think of installing software as adding a word processing program or database application, but any program on the operating system needs to be installed at one time or another.
Even the operating system itself was installed. For the moment, I want to restrict the definition of "operating system" to just those files that are necessary for "normal" operation. Although there are many files in the RTS that can be left out to have a running system, this is the base set that SCO installs.
If you examine these files, you see a major separation in functionality. Note that these files do not change if you have a different machine or architecture, but rather the files are, for the most part, directly related to the hardware. Perhaps the next most significant package is the extended utilities, or EXT package. These cover a wide range of areas such a printing, mail, backups and adding users.
We will talk about the link kit in much more detail later. SCO has defined a set of files that it considers the base set of extended utilities. This package is called BASE and contains such things as an unlimited precision calculator bc , a calendar cal and a disk copying program diskcp. Figure 0 28 5 SCO product units. One would be hard pressed to find an SCO system where users don't print.
Printing is one of the more common operations on a system. If one is talking about the act of printing, the files and programs that allow users to print are collectively called the "print spooler.
Contained within the LPR package are the programs that the system uses to manage the printing process. These include the program that schedules specific print jobs for specific printers: the print scheduler; as well as the programs that actually send the files to the printers. There are, of course, other programs that check the status of the print process, stop and start the print schedule, etc.
We'll be talking in more detail about all of this in the section on printing. Another commonly used package is MAIL, which contains the files used to communicate between users via electronic mail what else. This includes the mail program itself and its related programs, but it also contains the MMDF files.
Saying that the MAIL package contains just the files for communication between users via electronic mail is not entirely true. The MAIL package also contains a few other programs write, hello , and mesg that are used to communicate directly between users.
This shows how files are sometimes just lumped together in somewhat arbitrary packages. For more information see the respective man-pages. Similar terminology applies to the UUCP package. It contains more than just UUCP. This package also contains the modem configuration and access files referred to as "dialers" as they dial the phone. However, the UUCP package contains more than just programs to copy file between systems. There is also the ability to start programs on the remote system uux , as well as a simple terminal program cu.
This, however, does not contain the system administration shell, which is considered part of the RTS package. This includes programs like last which reports on the last time a user was logged in, or ncheck , which can be used to find out what file is associated with a particular inode.
The package also contains the tunesh or Tune-Shell program. The "real" backup programs, such as tar and cpio are part of the RTS. Is that all? Many are rarely used. Many contain just a few files and are related to a single entity such as the VI package that contains only vi and it's related files.
Administering over a hundred packages is a big task. To make things a little simpler, the packages themselves are grouped into larger units called Service Components.
These components are then grouped into Services. Except for the entire Operating System or the RTS, each of these services, service components and packages can be removed from or installed on the system. The officially supported way to remove these files is by using the custom utility. It is important to use custom to remove the files in a package, service components or service. If they are removed or installed by hand, inconsistencies can develop making it impossible to add or remove anything without completely corrupting your system.
Some of the changes help in cutting down software piracy, while others were implemented to help in remote distribution of software. In this new organization, there is still the basic concept of a "product. Each product is broken down into components. This is the largest unit of functionality. However, it could be sold as a stand-alone product, as it was before. Like products, components have their own version number.
Smaller than the component is the package. This is the smallest unit of software that can be installed or removed not counting single files. SCO designed the SSO structure based on its concept of software management, which covers installing, updating, removing and administering already installed software packages. The files that make up a product can be separated into those that remain unchanged such as binaries and those that do change such as configuration files.
Each represents a particular package and since there is one, unique SSO for each package, you can have copies of different versions of the same software. Which is used is dependent on the configuration and the connection to the SSO is made through the use of what are called symbolic links.
More on those later. It is these components that are the "objects" of the SSO. Because of the design of the SSO architecture, it is even more important that components be more "self-contained" units than in previous releases. These components are broken down even further, like ODT and previous releases. This is the concept of the package. These packages may contain files or other packages.
New to the SSO model is the idea of a parcel. This is used for more complex products, where breaking them into components and packages does not provide enough "granularity.
However, the distinction of what a parcel is not as clear cut. There is the OpenServer Enterprise product, which contains the Graphics parcel, for example. It is also possible for parcels to cover portions of multiple components. For example, the man-pages and other documentation may be thought of as a parcel. An SSO is essentially broken down into two parts. There is a part that is shared and other machines have access to it. The other part belongs to one specific client and is not accessed by other machines.
Here a client is any machine that uses the SSO, including the local machine. Files within the SSO have several characteristics. A shared file is one that clients can read only. Why make copies when they aren't going to get changed anyway? As you might guess, non-shared files are ones that can be modified by the client. These files now belong to the client. Public files are visible and accessible outside of the SSO. These are made available to the rest of the world users and other SSOs as links.
Almost exclusively, these are symbolic links, which have grown to become one of the primary administrative tools in OpenServer. These links make the real location of the file transparent to the system and applications.
Private files are only visible to that SSO. This provides a very important advantage. Let's first consider files that are not modified by the clients, that is, the shared files. These generally consist of the programs versus data or configuration files belonging to a particular package. Every client with a particular version of a package will be using the same programs and utilities. The non-shared files are the data and configuration files.
These are the aspects of that package that are applicable only to that particular client. Why should other clients have access or even care what is in these files?
By keeping these two separate, all you need to do when updating a package is to update the program portion and leave the data portion alone.
This essentially eliminates problems with updating packages where configuration files would often get overwritten during the update. Since only the program files are getting update, there is less fear of overwriting the data files. Not linked to an external directory. Table 0. This is one reason why things are done with symbolic links. Like a regular link, a symbolic link is just another name for a given file.
However, symbolic links do not need to point to anything "real. We can then overwrite the real file, without the symbolic link being effected. In addition, this scheme allows us to backup the data components without having to backup the programs files. Okay, so we now have an idea of how everything works, now let's take a look at where everything is. To find where the actual files you need to dig deep.
To help let's take look at a road map. The program files for a particular component are found in:. The data files are found in:. This directory is called a component's SSO root. So, what's with the K and P? Well, the single letters were chosen in order to keep the names as short as possible. Second, P refers to both products and packages. As for the K, well that stands for component. Originally, this was a C, which was often confused with the C programming language.
Instead they used K. In order to allow different vendors to use the same component name without conflicts, the vendor code defines a unique vendor. The component code is used to uniquely identify a component. The version number is, as one might guess the version of that particular component.
By including version numbers in this scheme, it is possible for different versions of the same component to exist. On any operating system there is a core set of tasks that are performed. On mutli-user or server systems such as SCO UNIX these tasks include adding and configuring printers, adding and administering users, and adding new hardware to the system.
Each of these tasks could take up an entire chapter in this book. In fact, I do cover all of these, and many others, in a fair bit of detail later on.
However, I think it's important to briefly cover all of the basic tasks that an administrator needs to perform in one place. There are a couple of reasons for this. They get into the position as they are the only ones in the company or department with computer experience. They've worked with DOS before By introducing the varied aspects of system administration here, I hope to lay the foundation for later chapters.
I first tell you that a car has a motor, brakes, a steering wheel and a transmission. Then, I tell you how each works. If your software does not have an identified developer in the chart below, a quick web search of the software title should give you some clues on who to contact.
Ask yourself: Do I always want to go through this process when I receive an unusual file? Do I want to have to download new software every time I don't have the software associated with the file? If not, download a universal file viewer File Magic now to open hundreds of different file types with one program.
There's a better solution. File Magic is a Universal Software Viewer that allows you to open almost all file types without having to buy special software.
0コメント