Click to See Complete Forum and Search --> : I'm BACK!
GMorris
07-26-2001, 10:26 AM
Hi, everybody,
Now that I have most of my install problems taken care of, I still have a lot of questions that I can't just "find" the answers to. I have searched through the documentation to no avail (so far) for some of these things. One thing that bothered me was, I did a grep search from my root directory to try and find some of this, but it gets to a file (?) that just locks it up completely. I forget the name of it, but it is about 268M, way to big to fit on that partition, and it seems to be either a memory dump or my swap file contents. (I have 256M physical and two 128M swap parts).
I can even view this "file", but there's nothing in the huge thing I need to look at anyway. Is there a way to skip this "file" when doing a grep search? Also, I cannot figure out how to format a floppy disk for use with Linux. I don't know how to monitor memory or swap usage. I managed to set up sound, but the only volume control I have is the knob on my speakers, and the setting I have to turn it to to hear good would burst my eardrums in Windows. I found a program that controls the sound daemon, but cannot figure out how to use it. It appears that the OS only uses 50% of it's possible volume, and I'd like to be able to turn it up from the OS, not the speaker knob. If anybody would be kind enough to shed a little light, it would be much appreciated. I know I sound like a total dummy, but Linux is far, far from what I'm used to. Thanks in advance,
Gary
furrycat
07-26-2001, 09:35 PM
All right! GMorris is in business.
You may be new but you're obviously willing to learn which means you'll do fine.
Now, about that grep.
Although you didn't say what you were doing, I suspect you tried something like
grep needle *
You already found out one reason why this is a bad idea: it greps through EVERYTHING, and will spit out lots of warnings when it can't treat directories as files, for example.
The command you want is find. find has an obscene amount of arguments and even experienced Unix geeks need to refer to its manpage from time to time. This manpage is 23 screens long!
The things you need to know are the -name, -type and -exec commands.
If you want to find files by name, do
find -name whatever
This will find all files, directories, symlinks, device files etc called whatever.
To find only certain types of files, use -type. To find only real files (that grep can work on)
find -type f
To find directories
find -type d
And so on. Finally (for today), you can make find do stuff on every file it turns up. Observe:
find -type f -name core -exec rm {} \;
This finds all regular files called core (not directories called core or symlinks called core...) and runs rm on them. Notice the {}, which gets replaced with the full path to the file find found and the <space>\; at the end. Don't ask why you need that. You just do!
So, to put it all together, if you want to grep for needle in all haystacks (I mean files) from root you do
find / -type f -exec grep -H needle {} \;
The -H option to grep makes it print the name of the file it matched. Exercise for the reader: why is it necessary in this case?
As for your sound, that's easy. aumix is a command that can be run from the command line and is quite easy to figure out. It also has a graphical version but there are loads of graphical volume mixers. If you're using Gnome or KDE just futz about with the menus until you find one.
GMorris
07-27-2001, 10:05 AM
OK! I'll check out the find command. Will it find text strings in files like grep? And what about formatting floppys? I still haven't got that one. I managed to get X running, but I know it's not like it should be. I've seen examples of how it CAN look, and what I have is nowhere near that. One of the biggest problems seems to be screen resolution. I have a 3dfx Voodoo Banshee card and my monitor can do up to 1280 x 1024, which I would never use anyway. 1024 x 768 seems to be the easist for me to read and get enough screen real estate. After installing Linux numerous times, I've learned a great deal, and when it comes time to try and setup the X config, I've tried about every combination of options that I can with this hardware. Red Hat comes with a program called Xsetup or something, and when I run that I cannot get control of the mouse. There, too, I have tried almost every option and am running out of things to try. I use a standard Microsoft Intellimouse 1.1A that is PS/2 compatible. For some reason, I feel like if I could get everything working right in that Xsetup program it would solve 90% of all my problems. Xwindows will run, but it's a pretty crappy looking thing the way I have it now. Is there anybody who has a few suggestions or that has had experience with this? Also, somebody PLEASE tell me how to format a floppy disk for use with linux. I can use a DOS disk, but I'd like to be able to use Linux' native file structure. Any help will, of course, be greatly appreciated!
Thanks,
Gary
[This message has been edited by GMorris (edited 07-27-2001).]
[This message has been edited by GMorris (edited 07-27-2001).]
[This message has been edited by GMorris (edited 07-27-2001).]
furrycat
07-29-2001, 09:19 PM
No, find won't look in files for text strings. That's why you need -exec grep <whatever> {} \;
To make a filesystem on a floppy you do the same thing as to make one on a hard drive: mke2fs /dev/fd0
X is one thing that definitely is easier to set up with newer distributions. Your old Red Hat might not be doing all the steps. If you're using a PS/2 mouse with the standard xf86config setup (can't tell you about Xsetup but it should be the same) then you need to make sure that /dev/psaux exists (mknod /dev/psaux c 10 1) and that /dev/mouse is a symlink to it (ln -sf psaux /dev/mouse).
I find that X at high resolutions is easier on the eye than Windows. Try your 1280x1024, you might get good use out of it.