On Fri, 30 Jan 2004 08:25:27 +1300 Roger Searle <[EMAIL PROTECTED]> wrote:
> >just use f5 to copy to a real directory! > > > copying to a directory was no problem - I still couldn't see how to > extract a single file from an rpm... for future reference: assume your rpms are in ~/RPMS (ie a dir called RPMS off your home dir). If not adjust to taste. 1. open midnight commander (mc) with two panels, each panel is independent with different directories on each panel. The easiest way to do this is mc ~/RPMS /etc/samba if it does not come up in two panels, use Alt-t to get it right. 2. on the left panel you should have ~/RPMS. scroll to the rpm file you want and hit enter, you should then be able to see a virtual view of the inside of the rpm. There will be a virtual directory INFO which has inside it a whole lot of info on the rpm. (If there are scripts that are performed by rpm on install/uninstall, those are also there under a subdir called SCRIPTS - very useful to know what the rpm is going to run when u install it). There is a file HEADER which has the rpm header, ie basics of what the rpm does etc. There are virtual scripts INSTALL and UPGRADE which do just that (if you are root, careful of these! hitting enter will install or upgade the package!). There is also a virtual file CONTENTS.cpio which contains all the files that will be installed with the rpm. hit enter on that and you will be inside the rpm, looking at all the compresed files. They are arranged in the directories where they will appear on your system. navigate through /etc/samba and the file smb.conf should be there. This is as it appears on a fresh install. You can view it with F3. Or you can copy it with F5, which will put a copy on your real file system, in the opposite panel. remember the other panel showed /etc/samba, so you will end up writing it to the right place in your real file system (and overwriting what you put there earlier). Hard to describe without some screenshots or a system in front of both of us! This also works on other archive formats, cpio, tar, gz, zip, tgz, bz2, etc etc (I think the extent of it depends on what flags mc was compiled with, or what libraries configure found when mc was compiled) you can also use mc to access networked filesystems using smb, mc's own protocol, ftp, and ssh. -- Nick Rout <[EMAIL PROTECTED]>
