Archive for the ‘UNIX’ Category
Aug
20
Have you ever downloaded a cpio file and wondered what the heck you were going to to with it? I get them from Oracle all the time, and the first time I downloaded one I wasn’t sure what to make of it. In the end, I found that working with cpio files is a breeze, so I thought I would pass on some information that might help.
Ok, just what is a cpio file? A cpio file is an archive, and it is a concatenation of one or more files. Each file in the collection contains a header optionally followed by file contents as indicated in the header. The end of the archive is indicated by another header describing an empty file named TRAILER. There are two types of cpio archives, differing only in the style of the header. ASCII archives have totally printable header information, so, if the files being archived are also ASCII files, the whole archive is ASCII. By default though, cpio writes archives with binary headers.
How do we work with these archive files? Easy. Here is an example, say you download a gzipped cpio file:
- First, download filename.cpio.gz and use gzip to uncompress.
- Then use cat filename.cpio | cpio -icd to extract to contents.
There you go, when you are done, the contents of the cpio file should be extracted to where ever you put the cpio file and ran the command. If you want to create an archive, you can pass a file list, like with find to the cpio command and have it create an archive, much like tar does. In my own experience, I prefer tar, but if you have cpio and don’t have tar, it’s better than nothing! Check out this page for more details, a nice article from Linux Journal.
Aug
18
It appears that Sun and IBM have struck a deal to help Solaris adoption by supporting it on many IBM servers. This could really help Sun and IBM both, and from someone who is deeply entrenched in Solaris (ableit on the SPARC platform), I think this is great news. As much as I love Linux, nothing I have seen can scale as large or run as well as Solaris. Linux is great, and works for many things, but when you need big systems, Solaris and SPARC work wonderfully. Now, one note is that if it fits the situation, Linux clusters have proven very powerful. Check out the article.
Aug
13
I guess this could be considered part of the password post that I put up a few minutes ago, but I wanted to post this script over in the forums that is a PERL script which generates passwords for you. Check it out, take a look and maybe you can get something beneficial from it!
Aug
1
This article could be called a continuation of the article I posted yesterday about creating mirrors in SVM, only this time I am talking about replacing failed drives in those mirrors we just created. Take a look and see some options for dealing with failed drives, and how to make Solaris Volume Manager (SVM) happy with it!
Jul
31
Ok folks, for any of you out there that manage Solaris machines (or want to), I have written up an article detailing one of the fundamental and basic things you do a lot of. Creating disk mirrors with SVM or Solaris Volume Manager. Now, this article does more than just tell you how to create the mirror, although it does do that. In addition, I tried to explain what was going on so that you could get an understanding of what was happening when you were running the commands. In the near future, we’ll have more articles dealing with SVM on such topics as how to replace a failed drive, and even other RAID options. For now though, we dig in to the area of mirrors. Check it out, I hope you find it useful!
Jul
28
I am one of those type of people that like to make backup copies of files before I tinker with them, especially when I am modifying important files like system stuff. It’s always a good idea to make a backup copy before you edit something so you can put it back if you break it. For that reason, I wrote this simple little PERL script that I then put somewhere in my path so I can run it from anywhere. I call it simply “bu” so that it’s easy to type and use. What it does is copy the target file you specify, to a file of the same name only with a date stamp appended to it. I have found this to be a really handy tool, so I thought I would share.
Take a look at the script here.
Check it out, I hope you find it as useful as I have.