Good point twelveeighty, my post was not of the best form.
Okay, let’s walk through a example of my difficulty. First, I open Gnome Terminal and the result is the expected shell prompt as follows:
warren@linux-frl2:~>
So let’s do a simple pwd command:
warren@linux-frl2:~> pwd
/home/warren
warren@linux-frl2:~>
Everything works as expected, pwd gives the working directory and returns to the shell prompt.
Now let’s look at my problem, for example, viewing the contents of the GRUB menu.lst file with less (or cat). Since this file is owned by root let’s go there:
warren@linux-frl2:~> su -l
Password:
linux-frl2:~ #
Okay, now I have the powers of the universe so I next less on menu.lst as follows:
Modified by YaST2. Last modification on Mon Mar 15 22:44:33 EDT 2010
THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloa
der
default 0
timeout 8
gfxmenu (hd0,0)/message
###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.2 - 2.6.31.5-0.1
root (hd0,0)
kernel /vmlinuz-2.6.31.5-0.1-default root=/dev/disk/by-id/ata-WDC_WD5000AAKB
-00H8A0_WD-WCASY8802778-part6 resume=/dev/disk/by-id/ata-WDC_WD5000AAKB-00H8A0_W
D-WCASY8802778-part2 splash=silent quiet showopts vga=0x31a
initrd /initrd-2.6.31.5-0.1-default
###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.2 - 2.6.31.5-0.1
root (hd0,0)
kernel /vmlinuz-2.6.31.5-0.1-default root=/dev/disk/by-id/ata-WDC_WD5000AAKB-00H8A0_WD-WCASY8802778-part6 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x31a
initrd /initrd-2.6.31.5-0.1-default
###Don’t change this comment - YaST2 identifier: Original name: windows###
title Windows
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1,0)
makeactive
chainloader +1
###Don’t change this comment - YaST2 identifier: Original name: floppy###
title Floppy
rootnoverify (hd0,0)
chainloader +1
/boot/grub/menu.lst lines 12-32/32 (END)
less does what it is suppose to an lists the file page at a time. Where I get stuck is how to get back to the shell prompt when the file has been listed, that is, at the line:
/boot/grub/menu.lst lines 12-32/32 (END)
Now, while doing this example, I inadvertanly found the solution - type ctrl-z and I get back to the shell prompt (thanks to elkikin’s reply jogging the cobwebs in the memory).
So now I need to reframe my question but it is basically the same issue. My last contact with the UNIX environment was 1996 so no doubt some things have changed. My recollection is that there was no consistency in the various shell commands in terminating or exiting programs such a less and cat (and others) back to the shell prompt. Is this true?
My first response to difficulty was the less man page which was not helpful. Then the various docs on the system with still no help. A quick google did not help. So the question becomes where can I look in general for this information?
With elkikin’s help ctrl-z has returned from the fog of years. I do recall the somewhat universal kill command: ctrl-c. Also recall a lot of ctrl-d, ctrl-x, and ctrl-something usage but for what…hmmm.
What I’m asking is very elementary shell stuff but I have not found any comprehensive resource, or even resource, on the subject. Any pointers?
Thanks.