Solved

linux Oracle VM can't see full output from commands such as ls

Posted on 2009-07-12
3
338 Views
Last Modified: 2013-11-11
Hello,

I'm using I believe the JetOS version of linux. It's Oracle VM.

It's all command line.

When I do for example any command that lists results:

ls
ls -ltr
cat

I can only see the end of the results on the screen.

In other words, I can't scroll up to see all the results.

Is there some kind of paging parameter I can use to see just a section of the results at a time and hit enter
and then go down a few lines see the next results etc?




0
Comment
Question by:ora-what
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 24836029
You can pipe the output through a pager such as "less". When using ls (i.e. without -l) you want to format by rows instead of columns using "ls -x". Personally I like to also use the -F option of ls, to show which entries are directories, executables and so on.
Instead of using "cat", use "less" directly.

Have you tried Shift-Page_up and Shift-Page_down? These normally give a degree of scrolling on text-only systems if you are actually at the console, may not necessarily work in a VM
ls -Fx | less

less afile

ls -Fltr | less

ls -Flt | less

Open in new window

0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 24836345
Actually "ls" is a bit more awkward to paginate than most commands because it behaves differently when stdout is a pipe. See below (lines starting # are comments)
# First determine the width of your screen

07:35:12$ stty size

25 80
 

# The second number is the width. Give this to ls (only seems to work if you also give -x)

09:06:58$ ls -xw80|less

Account.cpp               Account.cpp.bu    Account.h

Account.h.bu              Bordered$1.class  Bordered.class

Bordered.java             Bounds$1.class    Bounds$BoxedLabel.class

Bounds.class              Bounds.java       EtherLinkXL.c
 

# (further output suppressed)

# ls -Fxw80|less also works

Open in new window

0
 

Author Closing Comment

by:ora-what
ID: 31602585
the Shift + Pageup and Shift+Page down did it

thanks a million !

also very informative and educational
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now