[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bash functions



On  8 May, André Bell wrote:
> Does bash contain a pause feature other than control-z?
> 
> When I type 'help' the screen scrolls past and control-z doesn't stop the
> top few lines from scrolling away before I can read them.  with dos I'd
> just type 'dir /p' or type '<filename> |more'
> 
> Are there equivalent set of commands for bash?
> 
> Thanks!
> 
> Andre'
> 

Hello Andre!

There is no such function built in into bash, but there is the command
'less'. Just type 'less <filename>'.

X-Windows should be installed, at least it's on the CD's. To start it,
type: 'startx'.

About your other problems: The problems with permissions go away when
you log in as root. Altho that is generally not recommended. But when
you are logged in as root you can change the permissions on files to
let normal users like yourself read them. Or you can change the owner
of the file to your own loginname.

The commands for these are   chmod   and   chown

I don't know about your Debian CD's, but mine came with a rather nice
booklet aimed at the beginner. Unfortunately for you it's in dutch.
SuSE Linux comes with a rather nice manual. I suspect Caldera OpenLinux
does too.

As for your dos partitions, I'm afraid that no distribution sets them
up properly in the installation. For your floppy, apparantly the same
is true. What you have to do is edit the file fstab in the directory
/etc
Assuming you have the fte editor installed, type at the command line:

fte /etc/fstab

(Be sure to be logged in as root!)

If you are using for instance joe or emacs, or the simple 'ae' editor,
then just replace 'fte' with the name of your editor of course! :-)
However, for a beginning user I would recommend using either fte or ae.
Or an X-windows based editor, but my favourite X-windows editors don't
come with Debian 2.1 (except for fte) I'm using either kwrite (from KDE,
www.kde.org) or gEdit (from the Gnome desktop, www.gnome.org) when
editing. However, KDE is not included in Debian and the version of Gnome
included with Debian 2.1 is rather old!

Ok, back to business. Editing the file '/etc/fstab/ ...

I suppose that your fstab file contains a line in the form of:

/dev/fd0     /floppy     auto    defaults      0 0


If not, add that line, and change 'defaults' to: 
'defaults,user,noauto'.

No spaces between defaults, noauto and user, just a comma!

For your Windows/DOS partitions, you also have to add a line to this
file:

/dev/hda1       /c                      vfat    rw,noexec,uid=1001,gid=1001,umask=002  0 0


Is what I have in my fstab file, but replace the numbers after 'uid'
and 'gid' with your own userid / groupid. In the standard Debian
installation these are the same, and you can find them out by typing
(in the shell):

echo $UID

The '$' sign means that this is a shell-variable.

(BTW, in case you didn't find this out yet, you can open more than one
console or shell and switch between them using the Alt-function keys.)

When you added that line and saved the file, make a new directory
called /c

You might also need to add a line for your CD rom drive:

/dev/hdd        /cdrom          iso9660 noauto,ro,user                  0 0


Your CD rom might not be /dev/hdd ... it might be /dev/hdc.  The
easiest way to find out is probably to try mounting both devices.
Make sure a directory /cdrom exists :-)

By now you're probably wondering what the heck these lines in fstab all
mean, so type:

man fstab

in the shell. Looking at 'man mount' can also prove to be very useful!
:-)


After this editing it is probably the easiest thing to just reboot,
altho - still logged in as root - you can also type   'mount -a'.


You should now be able to type   'mount /floppy' even when you are not
logged as root. Always remember tho, to type    'umount /floppy' before
removing it!
When booting from a floppy however, the floppy disk is not mounted
under /floppy and I think it is already mounted somewhere else by the
system. I'm not sure tho, since I never boot from a floppy myself.


Your normal C drive from DOS should now be available as /c and you can
copy files by just using the normal 'cp' command.

About binary files, well all files that are in .rpm or in .deb format
are binary files. They don't have to be compiled anymore. Many files
with extension .tar.gz or .tgz are also binary: The downloadable
WordPerfect files for instance are binary files, altho they end with
.tgz.
You can install these files after converting them to .deb format using
a utility called 'alien' which should be on your Debian CD's, look it
up with dselect! :-)

When you have a file in the .deb format, you can install it using dpkg:

dpkg --install <filename.deb>

No doubt there is another way, but this is the way that I know of.  If
you have the text-based webbrowser 'lynx' installed then you can even
install .deb archives directly from lynx after downloading them. You
have to be logged in as root for this: Every time you want to  install
something, you have to log in as root, or enter the root password at
some point.


About the kernel, if I were in your place, I wouldn't bother yet about
re-compiling it... I don't know if you can get back to the Debian setup
programs, I don't regularly do that myself of course. If you do have to
recompile the kernel to get those serial card modules installed,
install the kernel source archive via dselect and then read the
Kernel-HOWTO to get yourself on the way...


Hey, I hope this gets you anywere, don't hesitate to ask me more or
more specific questions! :-)

--Tim



Reply to: